Drop ifdef'd code for gcc4.6 and msvc12
This commit is contained in:
@@ -69,11 +69,7 @@ namespace chaiscript
|
||||
typename std::enable_if<std::is_enum<Enum>::value, void>::type
|
||||
add_class(ModuleType &t_module,
|
||||
const std::string &t_class_name,
|
||||
#ifdef CHAISCRIPT_GCC_4_6
|
||||
const std::vector<std::pair<int, std::string>> &t_constants
|
||||
#else
|
||||
const std::vector<std::pair<typename std::underlying_type<Enum>::type, std::string>> &t_constants
|
||||
#endif
|
||||
)
|
||||
{
|
||||
t_module.add(chaiscript::user_type<Enum>(), t_class_name);
|
||||
@@ -87,13 +83,8 @@ namespace chaiscript
|
||||
return assign<Enum>(not_equal<Enum>(equal<Enum>()));
|
||||
}());
|
||||
|
||||
#ifdef CHAISCRIPT_GCC_4_6
|
||||
t_module.add(chaiscript::fun([](const Enum &e, const int &i) { return e == i; }), "==");
|
||||
t_module.add(chaiscript::fun([](const int &i, const Enum &e) { return i == e; }), "==");
|
||||
#else
|
||||
t_module.add(chaiscript::fun([](const Enum &e, const typename std::underlying_type<Enum>::type &i) { return e == i; }), "==");
|
||||
t_module.add(chaiscript::fun([](const typename std::underlying_type<Enum>::type &i, const Enum &e) { return i == e; }), "==");
|
||||
#endif
|
||||
|
||||
for (const auto &constant : t_constants)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user