From f00b15b8bf382f996fd042deaedbac71887fb14a Mon Sep 17 00:00:00 2001 From: bolero-MURAKAMI Date: Mon, 18 Jun 2012 17:13:18 +0900 Subject: [PATCH] fix bitset --- sprout/bitset.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sprout/bitset.hpp b/sprout/bitset.hpp index 7eb6e0e7..43c24dc9 100644 --- a/sprout/bitset.hpp +++ b/sprout/bitset.hpp @@ -919,11 +919,10 @@ namespace sprout { private: reference() = delete; public: - reference(bitset& b, std::size_t pos) SPROUT_NOEXCEPT + SPROUT_CONSTEXPR reference(bitset& b, std::size_t pos) SPROUT_NOEXCEPT : wp_(&b.getword(pos)) , bpos_(base_type::whichbit(pos)) {} - ~reference() SPROUT_NOEXCEPT {} reference& operator=(bool x) SPROUT_NOEXCEPT { @@ -944,10 +943,11 @@ namespace sprout { return *this; } - bool + SPROUT_CONSTEXPR bool operator~() const SPROUT_NOEXCEPT { return (*wp_ & base_type::maskbit(bpos_)) == 0; } + SPROUT_CONSTEXPR operator bool() const SPROUT_NOEXCEPT { return (*wp_ & base_type::maskbit(bpos_)) != 0; }