title: What is the fastest way to get the lowest set bit of a C++ std::bitset?
body: <p>I noticed that <a href="https://en.cppreference.com/w/cpp/utility/bitset" rel="nofollow noreferrer">std::bitset</a> does not have a function for returning or popping the lowest set bit of a bitset (nor the highest set bit for that matter). What is the fastest way to accomplish this task, specifically for std::bitset objects not guaranteed to be a certain number of bits long? I looked in the g++ compiler extensions and <a href="https://en.cppreference.com/w/cpp/numeric" rel="nofollow noreferrer">C++20 numerics</a> library and didn't find anything related to my problem.</p>
  <p>Two obvious methods to consider would be looping over the length of the bitset and using the <code>operator[]</code> or gradually shifting the bitset using <code>operator&gt;&gt;</code> until the first set bit is found.</p>