The bitset(unsigned long long) constructor was broken by the constexpr additions only on 32 bit platforms. Fixed. This addresses http://llvm.org/bugs/show_bug.cgi?id=15444.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@176559 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fae54b9c14
commit
11a31d0583
@ -249,7 +249,13 @@ inline _LIBCPP_INLINE_VISIBILITY
|
|||||||
_LIBCPP_CONSTEXPR
|
_LIBCPP_CONSTEXPR
|
||||||
__bitset<_N_words, _Size>::__bitset(unsigned long long __v) _NOEXCEPT
|
__bitset<_N_words, _Size>::__bitset(unsigned long long __v) _NOEXCEPT
|
||||||
#ifndef _LIBCPP_HAS_NO_CONSTEXPR
|
#ifndef _LIBCPP_HAS_NO_CONSTEXPR
|
||||||
|
#if __SIZE_WIDTH__ == 64
|
||||||
: __first_{__v}
|
: __first_{__v}
|
||||||
|
#elif __SIZE_WIDTH__ == 32
|
||||||
|
: __first_{__v, __v >> __bits_per_word}
|
||||||
|
#elif
|
||||||
|
#error This constructor has not been ported to this platform
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
#ifdef _LIBCPP_HAS_NO_CONSTEXPR
|
#ifdef _LIBCPP_HAS_NO_CONSTEXPR
|
||||||
@ -633,6 +639,7 @@ template <size_t _Size>
|
|||||||
class _LIBCPP_VISIBLE bitset
|
class _LIBCPP_VISIBLE bitset
|
||||||
: private __bitset<_Size == 0 ? 0 : (_Size - 1) / (sizeof(size_t) * CHAR_BIT) + 1, _Size>
|
: private __bitset<_Size == 0 ? 0 : (_Size - 1) / (sizeof(size_t) * CHAR_BIT) + 1, _Size>
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
static const unsigned __n_words = _Size == 0 ? 0 : (_Size - 1) / (sizeof(size_t) * CHAR_BIT) + 1;
|
static const unsigned __n_words = _Size == 0 ? 0 : (_Size - 1) / (sizeof(size_t) * CHAR_BIT) + 1;
|
||||||
typedef __bitset<__n_words, _Size> base;
|
typedef __bitset<__n_words, _Size> base;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user