Author
anonymous
almost 7 years ago
Language
C++
Compiler
clang 7.0.0
Options
Warnings
Boost 1.70.0
C++17
no pedantic
Author
anonymous
almost 7 years ago
$ clang++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.70.0/clang-7.0.0/include -std=c++17 In file included from prog.cc:1:
In file included from /opt/wandbox/clang-7.0.0/include/c++/v1/fstream:184:
In file included from /opt/wandbox/clang-7.0.0/include/c++/v1/ostream:138:
In file included from /opt/wandbox/clang-7.0.0/include/c++/v1/ios:216:
In file included from /opt/wandbox/clang-7.0.0/include/c++/v1/__locale:15:
In file included from /opt/wandbox/clang-7.0.0/include/c++/v1/string:500:
In file included from /opt/wandbox/clang-7.0.0/include/c++/v1/string_view:176:
In file included from /opt/wandbox/clang-7.0.0/include/c++/v1/__string:56:
In file included from /opt/wandbox/clang-7.0.0/include/c++/v1/algorithm:644:
/opt/wandbox/clang-7.0.0/include/c++/v1/memory:3114:32: error: no matching constructor for initialization of 'WalletCampaign'
return unique_ptr<_Tp>(new _Tp(_VSTD::forward<_Args>(__args)...));
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
prog.cc:50:32: note: in instantiation of function template specialization 'std::__1::make_unique<WalletCampaign, const nlohmann::basic_json<std::map, std::vector, std::__1::basic_string<char>, bool, long, unsigned long, double, std::allocator, adl_serializer> &>' requested here
campaigns.push_back(std::make_unique<WalletCampaign>(campaignJson));
^
prog.cc:20:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'const nlohmann::basic_json<std::map, std::vector, std::__1::basic_string<char>, bool, long, unsigned long, double, std::allocator, adl_serializer>' to 'const WalletCampaign' for 1st argument
class WalletCampaign
^
prog.cc:20:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'const nlohmann::basic_json<std::map, std::vector, std::__1::basic_string<char>, bool, long, unsigned long, double, std::allocator, adl_serializer>' to 'WalletCampaign' for 1st argument
prog.cc:23:4: note: candidate constructor not viable: 1st argument ('const nlohmann::basic_json<std::map, std::vector, std::__1::basic_string<char>, bool, long, unsigned long, double, std::allocator, adl_serializer>') would lose const qualifier
WalletCampaign(json& config)
^
./json.hpp:15637:5: note: candidate template ignored: requirement 'detail::is_detected<detail::get_template_function, const basic_json_t &, WalletCampaign>::value' was not satisfied [with ValueType = WalletCampaign]
operator ValueType() const
^
1 error generated.
Exit Code:
1