File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -473,7 +473,7 @@ protected:
473473 typedef __bitset __self;
474474 typedef __storage_type* __storage_pointer;
475475 typedef const __storage_type* __const_storage_pointer;
476- static const unsigned __bits_per_word = static_cast < unsigned >( sizeof (__storage_type) * CHAR_BIT) ;
476+ static const unsigned __bits_per_word;
477477
478478 friend class __bit_reference <__bitset>;
479479 friend class __bit_const_reference <__bitset>;
@@ -519,16 +519,16 @@ protected:
519519 _LIBCPP_HIDE_FROM_ABI size_t __hash_code () const _NOEXCEPT;
520520};
521521
522+ template <size_t _Size>
523+ const unsigned __bitset<1 , _Size>::__bits_per_word =
524+ static_cast <unsigned >(sizeof (typename __bitset<1 , _Size>::__storage_type) * CHAR_BIT);
525+
522526template <size_t _Size>
523527inline _LIBCPP_CONSTEXPR __bitset<1 , _Size>::__bitset() _NOEXCEPT : __first_(0 ) {}
524528
525529template <size_t _Size>
526530inline _LIBCPP_CONSTEXPR __bitset<1 , _Size>::__bitset(unsigned long long __v) _NOEXCEPT
527- : __first_(static_cast <__storage_type>(__v)) {
528- // Force __bits_per_word to be instantiated to avoid "gdb.error: There is no member or method named
529- // __bits_per_word"
530- (void )__bits_per_word;
531- }
531+ : __first_(static_cast <__storage_type>(__v)) {}
532532
533533template <size_t _Size>
534534inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void
You can’t perform that action at this time.
0 commit comments