Use static const true/false on platforms with magic statics
This commit is contained in:
@@ -15,6 +15,10 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef CHAISCRIPT_MSVC_12
|
||||||
|
#define CHAISCRIPT_HAS_MAGIC_STATICS
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#if defined( _LIBCPP_VERSION )
|
#if defined( _LIBCPP_VERSION )
|
||||||
|
@@ -409,6 +409,7 @@ namespace chaiscript
|
|||||||
return detail::const_var_impl(t);
|
return detail::const_var_impl(t);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CHAISCRIPT_HAS_MAGIC_STATICS
|
||||||
inline Boxed_Value const_var(bool b) {
|
inline Boxed_Value const_var(bool b) {
|
||||||
static auto t = detail::const_var_impl(true);
|
static auto t = detail::const_var_impl(true);
|
||||||
static auto f = detail::const_var_impl(false);
|
static auto f = detail::const_var_impl(false);
|
||||||
@@ -419,7 +420,7 @@ namespace chaiscript
|
|||||||
return f;
|
return f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user