Talk:cpp/utility/bitset/bitset

(2) has a unclear description. The standard document says:

constexpr bitset(unsigned long long val) noexcept; Effects: Constructs an object of class bitset, initializing the first M bit positions to the corresponding bit values in val. M is the smaller of N and the number of bits in the value representation (3.9) of unsigned long long. If M < N, the remaining bit positions are initialized to zero.

141.52.65.21 08:44, 25 April 2014 (PDT) JH


 * reworded and added examples, how does it look now? --Cubbi (talk) 09:35, 25 April 2014 (PDT)


 * This is clear now, thanks! 141.52.65.21 04:57, 30 April 2014 (PDT) JH

Exceptions for (3) and (4)
The page lists only std::out_of_range for (3), but as it notes above, it can also throw std::invalid_argument. Also, I think (4) should have the same exceptions as (3). I'd propose adding these to the "Exceptions" (out_of_range and invalid_argument for both (3) and (4)). Mortenpi (talk) 09:42, 21 May 2014 (PDT)
 * Thanks for bringing that up, I've updated the page. (except #4 doesn't throw out_of_range: there's no position argument) --Cubbi (talk) 12:11, 21 May 2014 (PDT)