File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
include/chaiscript/dispatchkit Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change 11
11
#include < type_traits>
12
12
#include < typeinfo>
13
13
#include < string>
14
- #include < bitset>
15
14
16
15
namespace chaiscript
17
16
{
@@ -84,12 +83,12 @@ namespace chaiscript
84
83
&& (*m_bare_type_info) == ti;
85
84
}
86
85
87
- CHAISCRIPT_CONSTEXPR bool is_const () const CHAISCRIPT_NOEXCEPT { return m_flags[ is_const_flag] ; }
88
- CHAISCRIPT_CONSTEXPR bool is_reference () const CHAISCRIPT_NOEXCEPT { return m_flags[ is_reference_flag] ; }
89
- CHAISCRIPT_CONSTEXPR bool is_void () const CHAISCRIPT_NOEXCEPT { return m_flags[ is_void_flag] ; }
90
- CHAISCRIPT_CONSTEXPR bool is_arithmetic () const CHAISCRIPT_NOEXCEPT { return m_flags[ is_arithmetic_flag] ; }
91
- CHAISCRIPT_CONSTEXPR bool is_undef () const CHAISCRIPT_NOEXCEPT { return m_flags[ is_undef_flag] ; }
92
- CHAISCRIPT_CONSTEXPR bool is_pointer () const CHAISCRIPT_NOEXCEPT { return m_flags[ is_pointer_flag] ; }
86
+ CHAISCRIPT_CONSTEXPR bool is_const () const CHAISCRIPT_NOEXCEPT { return m_flags & ( 1 << is_const_flag) ; }
87
+ CHAISCRIPT_CONSTEXPR bool is_reference () const CHAISCRIPT_NOEXCEPT { return m_flags & ( 1 << is_reference_flag) ; }
88
+ CHAISCRIPT_CONSTEXPR bool is_void () const CHAISCRIPT_NOEXCEPT { return m_flags & ( 1 << is_void_flag) ; }
89
+ CHAISCRIPT_CONSTEXPR bool is_arithmetic () const CHAISCRIPT_NOEXCEPT { return m_flags & ( 1 << is_arithmetic_flag) ; }
90
+ CHAISCRIPT_CONSTEXPR bool is_undef () const CHAISCRIPT_NOEXCEPT { return m_flags & ( 1 << is_undef_flag) ; }
91
+ CHAISCRIPT_CONSTEXPR bool is_pointer () const CHAISCRIPT_NOEXCEPT { return m_flags & ( 1 << is_pointer_flag) ; }
93
92
94
93
std::string name () const
95
94
{
@@ -119,7 +118,7 @@ namespace chaiscript
119
118
private:
120
119
const std::type_info *m_type_info;
121
120
const std::type_info *m_bare_type_info;
122
- std::bitset< 6 > m_flags;
121
+ unsigned int m_flags;
123
122
static const int is_const_flag = 0 ;
124
123
static const int is_reference_flag = 1 ;
125
124
static const int is_pointer_flag = 2 ;
You can’t perform that action at this time.
0 commit comments