aboutsummaryrefslogtreecommitdiff
path: root/games/nxengine
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2018-08-24 09:34:29 +0000
committerJan Beich <jbeich@FreeBSD.org>2018-08-24 09:34:29 +0000
commitb85c9ee6fb9b421759b8754e613a1ebb3caba9e4 (patch)
treeaf5c4e01fdac06e473c837bf34be1d1ba3b2a116 /games/nxengine
parente5fa0927c39838b8e1590985032124e2a5116dbc (diff)
downloadports-b85c9ee6fb9b421759b8754e613a1ebb3caba9e4.tar.gz
ports-b85c9ee6fb9b421759b8754e613a1ebb3caba9e4.zip
Notes
Diffstat (limited to 'games/nxengine')
-rw-r--r--games/nxengine/files/patch-libc++763
1 files changed, 63 insertions, 0 deletions
diff --git a/games/nxengine/files/patch-libc++7 b/games/nxengine/files/patch-libc++7
new file mode 100644
index 000000000000..f50b04c91d75
--- /dev/null
+++ b/games/nxengine/files/patch-libc++7
@@ -0,0 +1,63 @@
+https://github.com/nlohmann/json/commit/8165707990e4
+
+--- src/common/json.hpp.orig 2018-04-09 20:44:59 UTC
++++ src/common/json.hpp
+@@ -840,6 +840,16 @@ struct is_compatible_object_type_impl<true, RealType,
+ std::is_constructible<typename RealType::mapped_type, typename CompatibleObjectType::mapped_type>::value;
+ };
+
++template<bool B, class RealType, class CompatibleStringType>
++struct is_compatible_string_type_impl : std::false_type {};
++
++template<class RealType, class CompatibleStringType>
++struct is_compatible_string_type_impl<true, RealType, CompatibleStringType>
++{
++ static constexpr auto value =
++ std::is_same<typename RealType::value_type, typename CompatibleStringType::value_type>::value;
++};
++
+ template<class BasicJsonType, class CompatibleObjectType>
+ struct is_compatible_object_type
+ {
+@@ -850,6 +860,15 @@ struct is_compatible_object_type
+ typename BasicJsonType::object_t, CompatibleObjectType >::value;
+ };
+
++template<class BasicJsonType, class CompatibleStringType>
++struct is_compatible_string_type
++{
++ static auto constexpr value = is_compatible_string_type_impl <
++ conjunction<negation<std::is_same<void, CompatibleStringType>>,
++ has_value_type<CompatibleStringType>>::value,
++ typename BasicJsonType::string_t, CompatibleStringType >::value;
++};
++
+ template<typename BasicJsonType, typename T>
+ struct is_basic_json_nested_type
+ {
+@@ -1132,6 +1151,25 @@ void from_json(const BasicJsonType& j, typename BasicJ
+ {
+ JSON_THROW(type_error::create(302, "type must be string, but is " + std::string(j.type_name())));
+ }
++ s = *j.template get_ptr<const typename BasicJsonType::string_t*>();
++}
++
++template <
++ typename BasicJsonType, typename CompatibleStringType,
++ enable_if_t <
++ is_compatible_string_type<BasicJsonType, CompatibleStringType>::value and
++ not std::is_same<typename BasicJsonType::string_t,
++ CompatibleStringType>::value and
++ std::is_constructible <
++ BasicJsonType, typename CompatibleStringType::value_type >::value,
++ int > = 0 >
++void from_json(const BasicJsonType& j, CompatibleStringType& s)
++{
++ if (JSON_UNLIKELY(not j.is_string()))
++ {
++ JSON_THROW(type_error::create(302, "type must be string, but is " + std::string(j.type_name())));
++ }
++
+ s = *j.template get_ptr<const typename BasicJsonType::string_t*>();
+ }
+