Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ if(EMSCRIPTEN)
SET(XEUS_JAVASCRIPT_USE_SHARED_XEUS ON)
SET(XEUS_JAVASCRIPT_USE_SHARED_XEUS_JAVASCRIPT OFF)
SET(XEUS_JAVASCRIPT_BUILD_TESTS OFF)


if (EMSCRIPTEN_VERSION VERSION_LESS "4.0.0")
# c-definitions for older emscripten versions
add_compile_definitions(XEUS_JAVASCRIPT_EMSCRIPTEN_OLD)
endif()
endif()


Expand Down
43 changes: 3 additions & 40 deletions include/xeus-javascript/convert_json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ struct BindingType<nl::json> {
}
};

#ifdef XEUS_JAVASCRIPT_EMSCRIPTEN_OLD


template <typename T>
using is_decayed_json = std::is_same<std::decay_t<T>, nl::json>;
Expand All @@ -61,46 +63,7 @@ struct TypeID<T, enable_if_decayed_json<T> > {
}
};






// template <>
// struct TypeID<nl::json> {
// static constexpr TYPEID get() {
// return LightTypeID<val>::get();
// }
// };

// template <>
// struct TypeID<const nl::json> {
// static constexpr TYPEID get() {
// return LightTypeID<val>::get();
// }
// };

// template <>
// struct TypeID< nl::json && > {
// static constexpr TYPEID get() {
// return LightTypeID<val>::get();
// }
// };


// template <>
// struct TypeID<nl::json&> {
// static constexpr TYPEID get() {
// return LightTypeID<val>::get();
// }
// };

// template <>
// struct TypeID<const nl::json&> {
// static constexpr TYPEID get() {
// return LightTypeID<val>::get();
// }
// };
#endif

} // namespace internal
} // namespace emscripten