mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2024-11-14 10:39:05 +00:00
fix bitset
This commit is contained in:
parent
1d92a48584
commit
f00b15b8bf
1 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue