Author
anonymous
over 7 years ago
Language
Compiler
Options
Author
anonymous
over 7 years ago
$
prog.cc:31:1: warning: "/*" within comment [-Wcomment]
/**/
prog.cc: In function 'int main()':
prog.cc:36:8: error: no match for 'operator<<' (operand types are 'std::vector<int>' and 'int')
vec << int(2);
~~~~^~~~~~~~~
prog.cc:12:1: note: candidate: 'template<class T> typename Vector<T>::Type& operator<<(typename Vector<T>::Type&, const typename Vector<T>::Type::value_type&)'
operator<<(
^~~~~~~~
prog.cc:12:1: note: template argument deduction/substitution failed:
prog.cc:36:16: note: couldn't deduce template parameter 'T'
vec << int(2);
^
In file included from /opt/wandbox/gcc-head/include/c++/8.0.1/string:52,
from /opt/wandbox/gcc-head/include/c++/8.0.1/bits/locale_classes.h:40,
from /opt/wandbox/gcc-head/include/c++/8.0.1/bits/ios_base.h:41,
from /opt/wandbox/gcc-head/include/c++/8.0.1/ios:42,
from /opt/wandbox/gcc-head/include/c++/8.0.1/ostream:38,
from /opt/wandbox/gcc-head/include/c++/8.0.1/iostream:39,
from prog.cc:1:
/opt/wandbox/gcc-head/include/c++/8.0.1/bits/basic_string.h:6284:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)'
operator<<(basic_ostream<_CharT, _Traits>& __os,
^~~~~~~~
/opt/wandbox/gcc-head/include/c++/8.0.1/bits/basic_string.h:6284:5: note: template argument deduction/substitution failed:
prog.cc:36:16: note: 'std::vector<int>' is not derived from 'std::basic_ostream<_CharT, _Traits>'
vec << int(2);
^
In file included from /opt/wandbox/gcc-head/include/c++/8.0.1/iostream:39,
from prog.cc:1:
/opt/wandbox/gcc-head/include/c++/8.0.1/ostream:497:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, _CharT)'
operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
^~~~~~~~
/opt/wandbox/gcc-head/include/c++/8.0.1/ostream:497:5: note: template argument deduction/substitution failed:
prog.cc:36:16: note: 'std::vector<int>' is not derived from 'std::basic_ostream<_CharT, _Traits>'
vec << int(2);
^
In file included from /opt/wandbox/gcc-head/include/c++/8.0.1/iostream:39,
from prog.cc:1:
/opt/wandbox/gcc-head/include/c++/8.0.1/ostream:502:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, char)'
operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
^~~~~~~~
/opt/wandbox/gcc-head/include/c++/8.0.1/ostream:502:5: note: template argument deduction/substitution failed:
prog.cc:36:16: note: 'std::vector<int>' is not derived from 'std::basic_ostream<_CharT, _Traits>'
vec << int(2);
^
In file included from /opt/wandbox/gcc-head/include/c++/8.0.1/iostream:39,
from prog.cc:1:
/opt/wandbox/gcc-head/include/c++/8.0.1/ostream:508:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, char)'
operator<<(basic_ostream<char, _Traits>& __out, char __c)
^~~~~~~~
/opt/wandbox/gcc-head/include/c++/8.0.1/ostream:508:5: note: template argument deduction/substitution failed:
prog.cc:36:16: note: 'std::vector<int>' is not derived from 'std::basic_ostream<char, _Traits>'
vec << int(2);
^
In file included from /opt/wandbox/gcc-head/include/c++/8.0.1/iostream:39,
from prog.cc:1:
/opt/wandbox/gcc-head/include/c++/8.0.1/ostream:514:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, signed char)'
operator<<(basic_ostream<char, _Traits>& __out, signed char __c)
^~~~~~~~
/opt/wandbox/gcc-head/include/c++/8.0.1/ostream:514:5: note: template argument deduction/substitution failed:
prog.cc:36:16: note: 'std::vector<int>' is not derived from 'std::basic_ostream<char, _Traits>'
vec << int(2);
^
In file included from /opt/wandbox/gcc-head/include/c++/8.0.1/iostream:39,
from prog.cc:1:
/opt/wandbox/gcc-head/include/c++/8.0.1/ostream:519:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, unsigned char)'
operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c)
^~~~~~~~
/opt/wandbox/gcc-head/include/c++/8.0.1/ostream:519:5: note: template argument deduction/substitution failed:
prog.cc:36:16: note: 'std::vector<int>' is not derived from 'std::basic_ostream<char, _Traits>'
vec << int(2);
^
In file included from /opt/wandbox/gcc-head/include/c++/8.0.1/iostream:39,
from prog.cc:1:
/opt/wandbox/gcc-head/include/c++/8.0.1/ostream:539:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const _CharT*)'
operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s)
^~~~~~~~
/opt/wandbox/gcc-head/include/c++/8.0.1/ostream:539:5: note: template argument deduction/substitution failed:
prog.cc:36:16: note: 'std::vector<int>' is not derived from 'std::basic_ostream<_CharT, _Traits>'
vec << int(2);
^
In file included from /opt/wandbox/gcc-head/include/c++/8.0.1/ostream:693,
from /opt/wandbox/gcc-head/include/c++/8.0.1/iostream:39,
from prog.cc:1:
/opt/wandbox/gcc-head/include/c++/8.0.1/bits/ostream.tcc:321:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const char*)'
operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s)
^~~~~~~~
/opt/wandbox/gcc-head/include/c++/8.0.1/bits/ostream.tcc:321:5: note: template argument deduction/substitution failed:
prog.cc:36:16: note: 'std::vector<int>' is not derived from 'std::basic_ostream<_CharT, _Traits>'
vec << int(2);
^
In file included from /opt/wandbox/gcc-head/include/c++/8.0.1/iostream:39,
from prog.cc:1:
/opt/wandbox/gcc-head/include/c++/8.0.1/ostream:556:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const char*)'
operator<<(basic_ostream<char, _Traits>& __out, const char* __s)
^~~~~~~~
/opt/wandbox/gcc-head/include/c++/8.0.1/ostream:556:5: note: template argument deduction/substitution failed:
prog.cc:36:16: note: 'std::vector<int>' is not derived from 'std::basic_ostream<char, _Traits>'
vec << int(2);
^
In file included from /opt/wandbox/gcc-head/include/c++/8.0.1/iostream:39,
from prog.cc:1:
/opt/wandbox/gcc-head/include/c++/8.0.1/ostream:569:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const signed char*)'
operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s)
^~~~~~~~
/opt/wandbox/gcc-head/include/c++/8.0.1/ostream:569:5: note: template argument deduction/substitution failed:
prog.cc:36:16: note: 'std::vector<int>' is not derived from 'std::basic_ostream<char, _Traits>'
vec << int(2);
^
In file included from /opt/wandbox/gcc-head/include/c++/8.0.1/iostream:39,
from prog.cc:1:
/opt/wandbox/gcc-head/include/c++/8.0.1/ostream:574:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const unsigned char*)'
operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s)
^~~~~~~~
/opt/wandbox/gcc-head/include/c++/8.0.1/ostream:574:5: note: template argument deduction/substitution failed:
prog.cc:36:16: note: 'std::vector<int>' is not derived from 'std::basic_ostream<char, _Traits>'
vec << int(2);
^
Exit Code:
1