Author
anonymous
over 7 years ago
Language
C++
Compiler
gcc 8.1.0
Options
Warnings
Boost 1.68.0
C++2a(GNU)
no pedantic
Author
anonymous
over 7 years ago
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.68.0/gcc-8.1.0/include -std=gnu++2a In file included from prog.cc:1:
nlohmann/json.hpp: In instantiation of 'void nlohmann::detail::from_json(const BasicJsonType&, std::pair<_Tp1, _Tp2>&) [with BasicJsonType = nlohmann::basic_json<>; A1 = const std::__cxx11::basic_string<char>; A2 = Data]':
nlohmann/json.hpp:1430:25: required from 'decltype ((nlohmann::detail::from_json(j, val), void())) nlohmann::detail::from_json_fn::operator()(const BasicJsonType&, T&) const [with BasicJsonType = nlohmann::basic_json<>; T = std::pair<const std::__cxx11::basic_string<char>, Data>; decltype ((nlohmann::detail::from_json(j, val), void())) = void]'
nlohmann/json.hpp:11391:30: required from 'static decltype ((nlohmann::{anonymous}::from_json(forward<BasicJsonType>(j), val), void())) nlohmann::adl_serializer<T, SFINAE>::from_json(BasicJsonType&&, ValueType&) [with BasicJsonType = const nlohmann::basic_json<>&; ValueType = std::pair<const std::__cxx11::basic_string<char>, Data>; <template-parameter-1-1> = std::pair<const std::__cxx11::basic_string<char>, Data>; <template-parameter-1-2> = void; decltype ((nlohmann::{anonymous}::from_json(forward<BasicJsonType>(j), val), void())) = void]'
nlohmann/json.hpp:13921:45: required from 'ValueType nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::get() const [with ValueTypeCV = std::pair<const std::__cxx11::basic_string<char>, Data>; ValueType = std::pair<const std::__cxx11::basic_string<char>, Data>; typename std::enable_if<(((! nlohmann::detail::is_basic_json<U>::value) && nlohmann::detail::has_from_json<nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>, ValueType>::value) && (! nlohmann::detail::has_non_default_from_json<nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>, ValueType>::value)), int>::type <anonymous> = 0; ObjectType = std::map; ArrayType = std::vector; StringType = std::__cxx11::basic_string<char>; BooleanType = bool; NumberIntegerType = long int; NumberUnsignedType = long unsigned int; NumberFloatType = double; AllocatorType = std::allocator; JSONSerializer = nlohmann::adl_serializer]'
nlohmann/json.hpp:1279:73: required from 'void nlohmann::detail::from_json_array_impl(const BasicJsonType&, CompatibleArrayType&, nlohmann::detail::priority_tag<0>) [with BasicJsonType = nlohmann::basic_json<>; CompatibleArrayType = std::map<std::__cxx11::basic_string<char>, Data>]'
nlohmann/json.hpp:1302:25: required from 'decltype (((nlohmann::detail::from_json_array_impl(j, arr, nlohmann::detail::priority_tag<3>{}), j.get<typename CompatibleArrayType::value_type>()), void())) nlohmann::detail::from_json(const BasicJsonType&, CompatibleArrayType&) [with BasicJsonType = nlohmann::basic_json<>; CompatibleArrayType = std::map<std::__cxx11::basic_string<char>, Data>; typename std::enable_if<(((nlohmann::detail::is_compatible_array_type<BasicJsonType, CompatibleArrayType>::value && (! nlohmann::detail::is_compatible_object_type<BasicJsonType, CompatibleObjectType>::value)) && (! nlohmann::detail::is_compatible_string_type<BasicJsonType, CompatibleStringType>::value)) && (! nlohmann::detail::is_basic_json<T>::value)), int>::type <anonymous> = 0; decltype (((nlohmann::detail::from_json_array_impl(j, arr, nlohmann::detail::priority_tag<3>{}), j.get<typename CompatibleArrayType::value_type>()), void())) = void; typename CompatibleArrayType::value_type = std::pair<const std::__cxx11::basic_string<char>, Data>]'
nlohmann/json.hpp:1430:25: required from 'decltype ((nlohmann::detail::from_json(j, val), void())) nlohmann::detail::from_json_fn::operator()(const BasicJsonType&, T&) const [with BasicJsonType = nlohmann::basic_json<>; T = std::map<std::__cxx11::basic_string<char>, Data>; decltype ((nlohmann::detail::from_json(j, val), void())) = void]'
nlohmann/json.hpp:11391:30: required from 'static decltype ((nlohmann::{anonymous}::from_json(forward<BasicJsonType>(j), val), void())) nlohmann::adl_serializer<T, SFINAE>::from_json(BasicJsonType&&, ValueType&) [with BasicJsonType = const nlohmann::basic_json<>&; ValueType = std::map<std::__cxx11::basic_string<char>, Data>; <template-parameter-1-1> = std::map<std::__cxx11::basic_string<char>, Data>; <template-parameter-1-2> = void; decltype ((nlohmann::{anonymous}::from_json(forward<BasicJsonType>(j), val), void())) = void]'
nlohmann/json.hpp:14009:45: required from 'ValueType& nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::get_to(ValueType&) const [with ValueType = std::map<std::__cxx11::basic_string<char>, Data>; typename std::enable_if<((! nlohmann::detail::is_basic_json<BasicJsonType>::value) && nlohmann::detail::has_from_json<nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>, ValueType>::value), int>::type <anonymous> = 0; ObjectType = std::map; ArrayType = std::vector; StringType = std::__cxx11::basic_string<char>; BooleanType = bool; NumberIntegerType = long int; NumberUnsignedType = long unsigned int; NumberFloatType = double; AllocatorType = std::allocator; JSONSerializer = nlohmann::adl_serializer]'
prog.cc:42:18: required from here
nlohmann/json.hpp:1370:7: error: use of deleted function 'std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(typename std::conditional<std::__not_<std::__and_<std::is_copy_assignable<_Tp>, std::is_copy_assignable<_T2> > >::value, const std::pair<_T1, _T2>&, const std::__nonesuch_no_braces&>::type) [with _T1 = const std::__cxx11::basic_string<char>; _T2 = Data; typename std::conditional<std::__not_<std::__and_<std::is_copy_assignable<_Tp>, std::is_copy_assignable<_T2> > >::value, const std::pair<_T1, _T2>&, const std::__nonesuch_no_braces&>::type = const std::pair<const std::__cxx11::basic_string<char>, Data>&]'
p = {j.at(0).template get<A1>(), j.at(1).template get<A2>()};
~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /opt/wandbox/gcc-8.1.0/include/c++/8.1.0/utility:70,
from /opt/wandbox/gcc-8.1.0/include/c++/8.1.0/algorithm:60,
from nlohmann/json.hpp:37,
from prog.cc:1:
/opt/wandbox/gcc-8.1.0/include/c++/8.1.0/bits/stl_pair.h:378:7: note: declared here
operator=(typename conditional<
^~~~~~~~
Exit Code:
1