@@ -352,7 +352,12 @@ class dynamic_bitset
352
352
// !
353
353
// ! \pre
354
354
// ! `pos <= s.size()` and the characters used to initialize the
355
- // ! bits are '0' or '1'.
355
+ // ! bits compare equal to either `std::use_facet< std::ctype< CharT > >( std::locale() ).widen( '0' )`
356
+ // ! or `std::use_facet< std::ctype< CharT > >( std::locale() ).widen( '1' )`. E.g.:
357
+ // !
358
+ // ! \code
359
+ // ! dynamic_bitset<> b( std::string( "10xyz" ), 0, 2 ); // OK
360
+ // ! \endcode
356
361
// !
357
362
// ! \param s The string to construct from.
358
363
// ! \param pos The start position in the string.
@@ -374,7 +379,13 @@ class dynamic_bitset
374
379
// ! to the corresponding characters in `s`.
375
380
// !
376
381
// ! \pre
377
- // ! The characters in `s` are '0' or '1'.
382
+ // ! The characters in `s` that are used to initialize the bits
383
+ // ! compare equal to either `std::use_facet< std::ctype< CharT > >( std::locale() ).widen( '0' )`
384
+ // ! or `std::use_facet< std::ctype< CharT > >( std::locale() ).widen( '1' )`. E.g.:
385
+ // !
386
+ // ! \code
387
+ // ! dynamic_bitset<> b( "10xyz", 2 ); // OK
388
+ // ! \endcode
378
389
// !
379
390
// ! \param s The string to construct from.
380
391
// ! \param n The maximum number of characters in the string to
@@ -394,7 +405,13 @@ class dynamic_bitset
394
405
// ! as C++17 or later.
395
406
// !
396
407
// ! \pre
397
- // ! The characters in `sv` are '0' or '1'.
408
+ // ! The characters in `sv` that are use to initialize the bits
409
+ // ! compare equal to either `std::use_facet< std::ctype< CharT > >( std::locale() ).widen( '0' )`
410
+ // ! or `std::use_facet< std::ctype< CharT > >( std::locale() ).widen( '1' )`. E.g.:
411
+ // !
412
+ // ! \code
413
+ // ! dynamic_bitset<> b( std::string_view( "10xyz", 2 ) ); // OK
414
+ // ! \endcode
398
415
// !
399
416
// ! \param sv The basic_string_view to construct from.
400
417
// ! \param num_bits The size of the bitset to construct, if
0 commit comments