1
0
Fork 0
mirror of https://github.com/bolero-MURAKAMI/Sprout synced 2024-11-12 21:09:01 +00:00
This commit is contained in:
bolero-MURAKAMI 2016-02-12 22:07:44 +09:00
parent e7a79b31ea
commit cc756cb22d
2 changed files with 6 additions and 5 deletions

View file

@ -943,14 +943,14 @@ namespace sprout {
typedef bool value_type; typedef bool value_type;
public: public:
class reference { class reference {
friend class bitset; friend class bitset<N>;
private: private:
word_type* wp_; word_type* wp_;
size_type bpos_; size_type bpos_;
private: private:
reference() SPROUT_DELETED_FUNCTION_DECL reference() SPROUT_DELETED_FUNCTION_DECL
public: public:
SPROUT_CONSTEXPR reference(bitset& b, size_type pos) SPROUT_NOEXCEPT SPROUT_CONSTEXPR reference(bitset<N>& b, size_type pos) SPROUT_NOEXCEPT
: wp_(&b.getword(pos)) : wp_(&b.getword(pos))
, bpos_(base_type::whichbit(pos)) , bpos_(base_type::whichbit(pos))
{} {}

View file

@ -10,6 +10,7 @@
#include <string> #include <string>
#include <stdexcept> #include <stdexcept>
#include <sprout/config.hpp>
#include <sprout/assert.hpp> #include <sprout/assert.hpp>
#ifdef TESTSPR_CONFIG_ENABLE_STATIC_WARNING #ifdef TESTSPR_CONFIG_ENABLE_STATIC_WARNING
# include <sprout/static_warning.hpp> # include <sprout/static_warning.hpp>
@ -58,11 +59,11 @@ namespace testspr {
// //
// TESTSPR_BOTH_ASSERT // TESTSPR_BOTH_ASSERT
// //
#ifndef SPROUT_CONFIG_DISABLE_CONSTEXPR #if !defined(SPROUT_CONFIG_DISABLE_CONSTEXPR) && !defined(SPROUT_NO_STATIC_CONSTEXPR_INITIALIZATION)
# define TESTSPR_BOTH_ASSERT(expr) TESTSPR_STATIC_ASSERT(expr); TESTSPR_ASSERT(expr) # define TESTSPR_BOTH_ASSERT(expr) TESTSPR_STATIC_ASSERT(expr); TESTSPR_ASSERT(expr)
#else // #ifndef SPROUT_CONFIG_DISABLE_CONSTEXPR #else
# define TESTSPR_BOTH_ASSERT(expr) TESTSPR_ASSERT(expr) # define TESTSPR_BOTH_ASSERT(expr) TESTSPR_ASSERT(expr)
#endif // #ifndef SPROUT_CONFIG_DISABLE_CONSTEXPR #endif
// //
// TESTSPR_STATIC_WARNING // TESTSPR_STATIC_WARNING