Author
anonymous
over 6 years ago
Language
C++
Compiler
gcc 9.2.0
Options
Warnings
Don't Use Boost
C++11(GNU)
no pedantic
Author
anonymous
over 6 years ago
$ g++ prog.cc -Wall -Wextra -std=gnu++11 In file included from /opt/wandbox/nlohmann-json/include/nlohmann/adl_serializer.hpp:5,
from /opt/wandbox/nlohmann-json/include/nlohmann/json.hpp:51,
from prog.cc:1:
/opt/wandbox/nlohmann-json/include/nlohmann/detail/conversions/from_json.hpp: In instantiation of 'void nlohmann::detail::from_json(const BasicJsonType&, std::valarray<_Tp>&) [with BasicJsonType = nlohmann::basic_json<>; T = int; typename std::enable_if<std::is_convertible<_From, _To>::value, int>::type <anonymous> = 0]':
/opt/wandbox/nlohmann-json/include/nlohmann/detail/conversions/from_json.hpp:377: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::valarray<int>; decltype ((nlohmann::detail::from_json(j, val), void())) = void]'
/opt/wandbox/nlohmann-json/include/nlohmann/adl_serializer.hpp:28: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::valarray<int>; <template-parameter-1-1> = std::valarray<int>; <template-parameter-1-2> = void; decltype ((nlohmann::{anonymous}::from_json(forward<BasicJsonType>(j), val), void())) = void]'
/opt/wandbox/nlohmann-json/include/nlohmann/json.hpp:2596:45: required from 'ValueType nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::get() const [with ValueTypeCV = std::valarray<int>; ValueType = std::valarray<int>; 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]'
prog.cc:8:30: required from here
/opt/wandbox/nlohmann-json/include/nlohmann/detail/conversions/from_json.hpp:157:17: error: 'nlohmann::basic_json<>::json_value nlohmann::basic_json<>::m_value' is private within this context
157 | std::copy(j.m_value.array->begin(), j.m_value.array->end(), std::begin(l));
| ~~^~~~~~~
In file included from prog.cc:1:
/opt/wandbox/nlohmann-json/include/nlohmann/json.hpp:6430:16: note: declared private here
6430 | json_value m_value = {};
| ^~~~~~~
In file included from /opt/wandbox/nlohmann-json/include/nlohmann/adl_serializer.hpp:5,
from /opt/wandbox/nlohmann-json/include/nlohmann/json.hpp:51,
from prog.cc:1:
/opt/wandbox/nlohmann-json/include/nlohmann/detail/conversions/from_json.hpp:157:43: error: 'nlohmann::basic_json<>::json_value nlohmann::basic_json<>::m_value' is private within this context
157 | std::copy(j.m_value.array->begin(), j.m_value.array->end(), std::begin(l));
| ~~^~~~~~~
In file included from prog.cc:1:
/opt/wandbox/nlohmann-json/include/nlohmann/json.hpp:6430:16: note: declared private here
6430 | json_value m_value = {};
| ^~~~~~~
Exit Code:
1