Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

about 8 years ago

Language

Compiler

Options

Author

anonymous

about 8 years ago

$
prog.cc: In function 'int main()':
prog.cc:17:28: error: no matching function for call to 'begin(std::vector<int>&)'
     std::cout << *::begin(v) << std::endl;
                            ^
prog.cc:8:20: note: candidate: template<class T> decltype (T:: begin) begin(T&)
 decltype(T::begin) begin(T& container) { return container.begin(); }
                    ^~~~~
prog.cc:8:20: note:   template argument deduction/substitution failed:
prog.cc: In substitution of 'template<class T> decltype (T:: begin) begin(T&) [with T = std::vector<int>]':
prog.cc:17:28:   required from here
prog.cc:8:20: error: decltype cannot resolve address of overloaded function
prog.cc:11:4: note: candidate: template<class T, long unsigned int N> T* begin(T (&)[N])
 T* begin(T (&array) [N]) { return &array[0]; }
    ^~~~~
prog.cc:11:4: note:   template argument deduction/substitution failed:
prog.cc:17:28: note:   mismatched types 'T [N]' and 'std::vector<int>'
     std::cout << *::begin(v) << std::endl;
                            ^
prog.cc:20:71: error: no matching function for call to 'begin(std::vector<int>&)'
     std::cout << boost::typeindex::type_id_with_cvr<decltype(::begin(v))>().pretty_name() << std::endl;
                                                                       ^
prog.cc:8:20: note: candidate: template<class T> decltype (T:: begin) begin(T&)
 decltype(T::begin) begin(T& container) { return container.begin(); }
                    ^~~~~
prog.cc:8:20: note:   template argument deduction/substitution failed:
prog.cc: In substitution of 'template<class T> decltype (T:: begin) begin(T&) [with T = std::vector<int>]':
prog.cc:20:71:   required from here
prog.cc:8:20: error: decltype cannot resolve address of overloaded function
prog.cc:11:4: note: candidate: template<class T, long unsigned int N> T* begin(T (&)[N])
 T* begin(T (&array) [N]) { return &array[0]; }
    ^~~~~
prog.cc:11:4: note:   template argument deduction/substitution failed:
prog.cc:20:71: note:   mismatched types 'T [N]' and 'std::vector<int>'
     std::cout << boost::typeindex::type_id_with_cvr<decltype(::begin(v))>().pretty_name() << std::endl;
                                                                       ^
prog.cc:20:71: error: no matching function for call to 'begin(std::vector<int>&)'
prog.cc:8:20: note: candidate: template<class T> decltype (T:: begin) begin(T&)
 decltype(T::begin) begin(T& container) { return container.begin(); }
                    ^~~~~
prog.cc:8:20: note:   template argument deduction/substitution failed:
prog.cc: In substitution of 'template<class T> decltype (T:: begin) begin(T&) [with T = std::vector<int>]':
prog.cc:20:71:   required from here
prog.cc:8:20: error: decltype cannot resolve address of overloaded function
prog.cc:11:4: note: candidate: template<class T, long unsigned int N> T* begin(T (&)[N])
 T* begin(T (&array) [N]) { return &array[0]; }
    ^~~~~
prog.cc:11:4: note:   template argument deduction/substitution failed:
prog.cc:20:71: note:   mismatched types 'T [N]' and 'std::vector<int>'
     std::cout << boost::typeindex::type_id_with_cvr<decltype(::begin(v))>().pretty_name() << std::endl;
                                                                       ^
prog.cc:20:75: error: no matching function for call to 'type_id_with_cvr<<expression error> >()'
     std::cout << boost::typeindex::type_id_with_cvr<decltype(::begin(v))>().pretty_name() << std::endl;
                                                                           ^
In file included from prog.cc:5:0:
/opt/wandbox/boost-1.65.1/gcc-7.2.0/include/boost/type_index.hpp:231:19: note: candidate: template<class T> boost::typeindex::type_index boost::typeindex::type_id_with_cvr()
 inline type_index type_id_with_cvr() BOOST_NOEXCEPT {
                   ^~~~~~~~~~~~~~~~
/opt/wandbox/boost-1.65.1/gcc-7.2.0/include/boost/type_index.hpp:231:19: note:   template argument deduction/substitution failed:
prog.cc:20:75: error: template argument 1 is invalid
     std::cout << boost::typeindex::type_id_with_cvr<decltype(::begin(v))>().pretty_name() << std::endl;
                                                                           ^
Exit Code:
1