Use static const true/false on platforms with magic statics

This commit is contained in:
Jason Turner
2015-05-02 15:27:51 -06:00
parent 45baf6f8e9
commit c0dd0a3041
2 changed files with 6 additions and 1 deletions

View File

@@ -409,6 +409,7 @@ namespace chaiscript
return detail::const_var_impl(t);
}
#ifdef CHAISCRIPT_HAS_MAGIC_STATICS
inline Boxed_Value const_var(bool b) {
static auto t = detail::const_var_impl(true);
static auto f = detail::const_var_impl(false);
@@ -419,7 +420,7 @@ namespace chaiscript
return f;
}
}
#endif
}