1
0
Fork 0
mirror of https://github.com/bolero-MURAKAMI/Sprout synced 2025-08-03 12:49:50 +00:00

fix bitset for constexpr disabled

This commit is contained in:
bolero-MURAKAMI 2012-06-21 01:40:38 +09:00
parent 1f041c0edc
commit 71b6e89f92
6 changed files with 1517 additions and 1464 deletions

28
sprout/bitset/bitwise.hpp Normal file
View file

@ -0,0 +1,28 @@
#ifndef SPROUT_BITSET_BITWISE_HPP
#define SPROUT_BITSET_BITWISE_HPP
#include <cstddef>
#include <sprout/config.hpp>
#include <sprout/bitset/bitset.hpp>
namespace sprout {
// 20.5.4 bitset operators:
template<std::size_t N>
inline SPROUT_CONSTEXPR bitset<N>
operator&(sprout::bitset<N> const& lhs, sprout::bitset<N> const& rhs) SPROUT_NOEXCEPT {
return sprout::bitset<N>(lhs.do_and(rhs));
}
template<std::size_t N>
inline SPROUT_CONSTEXPR bitset<N>
operator|(sprout::bitset<N> const& lhs, sprout::bitset<N> const& rhs) SPROUT_NOEXCEPT {
return sprout::bitset<N>(lhs.do_or(rhs));
}
template<std::size_t N>
inline SPROUT_CONSTEXPR bitset<N>
operator^(sprout::bitset<N> const& lhs, sprout::bitset<N> const& rhs) SPROUT_NOEXCEPT {
return sprout::bitset<N>(lhs.do_xor(rhs));
}
} // namespace sprout
#endif // #ifndef SPROUT_BITSET_BITWISE_HPP