Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/llvm/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2012-07-07 21:04:52 +0400
committerHoward Hinnant <hhinnant@apple.com>2012-07-07 21:04:52 +0400
commiteeac9fcfb723bc5ea98b3857536b7f938660d762 (patch)
treeaa86db2a6267b96d5a28d1b554d0d9e4961db535 /libcxx/include/__bit_reference
parent61d926859585db6acc38b79776ddb03c90a664d4 (diff)
Apply constexpr to <bitset>.
llvm-svn: 159899
Diffstat (limited to 'libcxx/include/__bit_reference')
-rw-r--r--libcxx/include/__bit_reference3
1 files changed, 2 insertions, 1 deletions
diff --git a/libcxx/include/__bit_reference b/libcxx/include/__bit_reference
index 21ce11f558dd..b91532db2ecd 100644
--- a/libcxx/include/__bit_reference
+++ b/libcxx/include/__bit_reference
@@ -131,13 +131,14 @@ public:
__bit_const_reference(const __bit_reference<_Cp>& __x) _NOEXCEPT
: __seg_(__x.__seg_), __mask_(__x.__mask_) {}
- _LIBCPP_INLINE_VISIBILITY operator bool() const _NOEXCEPT
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR operator bool() const _NOEXCEPT
{return static_cast<bool>(*__seg_ & __mask_);}
_LIBCPP_INLINE_VISIBILITY __bit_iterator<_Cp, true> operator&() const _NOEXCEPT
{return __bit_iterator<_Cp, true>(__seg_, static_cast<unsigned>(__ctz(__mask_)));}
private:
_LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR
__bit_const_reference(__storage_pointer __s, __storage_type __m) _NOEXCEPT
: __seg_(__s), __mask_(__m) {}