Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 5 years ago

Language

Compiler

Options

Author

anonymous

over 5 years ago

$
prog.cc: In function 'int main()':
prog.cc:104:36: error: no matching function for call to 'to_json(X)'
  104 |     std::cout << cpt::to_json(X{42}) << std::endl;
      |                                    ^
prog.cc:32:20: note: candidate: 'std::string cpt::to_json(bool)'
   32 | inline std::string to_json(const bool b)
      |                    ^~~~~~~
prog.cc:32:39: note:   no known conversion for argument 1 from 'X' to 'bool'
   32 | inline std::string to_json(const bool b)
      |                            ~~~~~~~~~~~^
prog.cc:39:20: note: candidate: 'std::string cpt::to_json(T) [with T = X; std::string = std::__cxx11::basic_string<char>]'
   39 | inline std::string to_json(const T i)
      |                    ^~~~~~~
prog.cc:39:20: note: constraints not satisfied
In file included from prog.cc:1:
/opt/wandbox/gcc-head/include/c++/11.0.0/concepts: In instantiation of 'std::string cpt::to_json(T) [with T = X; std::string = std::__cxx11::basic_string<char>]':
prog.cc:104:36:   required from here
/opt/wandbox/gcc-head/include/c++/11.0.0/concepts:102:13:   required for the satisfaction of 'integral<T>' [with T = X]
/opt/wandbox/gcc-head/include/c++/11.0.0/concepts:102:24: note: the expression 'is_integral_v<_Tp> [with _Tp = X]' evaluated to 'false'
  102 |     concept integral = is_integral_v<_Tp>;
      |                        ^~~~~~~~~~~~~~~~~~
prog.cc:45:20: note: candidate: 'std::string cpt::to_json(T) [with T = X; std::string = std::__cxx11::basic_string<char>]'
   45 | inline std::string to_json(const T f)
      |                    ^~~~~~~
prog.cc:45:20: note: constraints not satisfied
In file included from prog.cc:1:
/opt/wandbox/gcc-head/include/c++/11.0.0/concepts: In instantiation of 'std::string cpt::to_json(T) [with T = X; std::string = std::__cxx11::basic_string<char>]':
prog.cc:104:36:   required from here
/opt/wandbox/gcc-head/include/c++/11.0.0/concepts:111:13:   required for the satisfaction of 'floating_point<T>' [with T = X]
/opt/wandbox/gcc-head/include/c++/11.0.0/concepts:111:30: note: the expression 'is_floating_point_v<_Tp> [with _Tp = X]' evaluated to 'false'
  111 |     concept floating_point = is_floating_point_v<_Tp>;
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~
prog.cc:50:20: note: candidate: 'std::string cpt::to_json(const string&)'
   50 | inline std::string to_json(const std::string& s)
      |                    ^~~~~~~
prog.cc:50:47: note:   no known conversion for argument 1 from 'X' to 'const string&' {aka 'const std::__cxx11::basic_string<char>&'}
   50 | inline std::string to_json(const std::string& s)
      |                            ~~~~~~~~~~~~~~~~~~~^
prog.cc:57:20: note: candidate: 'std::string cpt::to_json(const T&) [with T = X; std::string = std::__cxx11::basic_string<char>]'
   57 | inline std::string to_json(const T& v)
      |                    ^~~~~~~
prog.cc:57:20: note: constraints not satisfied
prog.cc: In instantiation of 'std::string cpt::to_json(const T&) [with T = X; std::string = std::__cxx11::basic_string<char>]':
prog.cc:104:36:   required from here
prog.cc:8:9:   required for the satisfaction of 'range<T>' [with T = X]
prog.cc:29:9:   required for the satisfaction of 'vector_like_container<T>' [with T = X]
prog.cc:8:17:   in requirements with 'T& t' [with T = X]
prog.cc:9:15: note: the required expression 'std::begin(t)' is invalid
    9 |     std::begin(t);
      |     ~~~~~~~~~~^~~
prog.cc:10:15: note: the required expression 'std::end(t)' is invalid
   10 |     std::end  (t);
      |     ~~~~~~~~~~^~~
cc1plus: note: set '-fconcepts-diagnostics-depth=' to at least 2 for more detail
prog.cc:73:20: note: candidate: 'std::string cpt::to_json(const T&) [with T = X; std::string = std::__cxx11::basic_string<char>]'
   73 | inline std::string to_json(const T& m)
      |                    ^~~~~~~
prog.cc:73:20: note: constraints not satisfied
prog.cc: In instantiation of 'std::string cpt::to_json(const T&) [with T = X; std::string = std::__cxx11::basic_string<char>]':
prog.cc:104:36:   required from here
prog.cc:8:9:   required for the satisfaction of 'range<T>' [with T = X]
prog.cc:25:9:   required for the satisfaction of 'map_like_container<T>' [with T = X]
prog.cc:8:17:   in requirements with 'T& t' [with T = X]
prog.cc:9:15: note: the required expression 'std::begin(t)' is invalid
    9 |     std::begin(t);
      |     ~~~~~~~~~~^~~
prog.cc:10:15: note: the required expression 'std::end(t)' is invalid
   10 |     std::end  (t);
      |     ~~~~~~~~~~^~~
Exit Code:
1