Skip to content

Commit c86557e

Browse files
committed
Fix gdb.error
1 parent 233eeb3 commit c86557e

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

libcxx/include/bitset

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -524,11 +524,7 @@ inline _LIBCPP_CONSTEXPR __bitset<1, _Size>::__bitset() _NOEXCEPT : __first_(0)
524524

525525
template <size_t _Size>
526526
inline _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-
}
527+
: __first_(_Size == __bits_per_word ? static_cast<__storage_type>(__v) : static_cast<__storage_type>(__v)) {}
532528

533529
template <size_t _Size>
534530
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void

0 commit comments

Comments
 (0)