Author
anonymous
over 4 years ago
Language
C++
Compiler
clang HEAD 11.0.0 (https://github.com/llvm/llvm-project.git f441313464b2eef94a41c60bfde31a2bf9c602d7)
Options
Warnings
Boost 1.73.0
C++2a(GNU)
no pedantic
Author
anonymous
over 4 years ago
$ clang++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.73.0/clang-head/include -std=gnu++2a
prog.cc:10:15: error: invalid operands to binary expression ('std::istream' (aka 'basic_istream<char>') and 'const int')
return is >> val.x;
~~ ^ ~~~~~
/opt/wandbox/clang-head/include/c++/v1/cstddef:151:3: note: candidate function template not viable: no known conversion from 'std::istream' (aka 'basic_istream<char>') to 'std::byte' for 1st argument
operator>> (byte __lhs, _Integer __shift) noexcept
^
/opt/wandbox/clang-head/include/c++/v1/istream:678:1: note: candidate function template not viable: no known conversion from 'const int' to 'unsigned char &' for 2nd argument
operator>>(basic_istream<char, _Traits>& __is, unsigned char& __c)
^
/opt/wandbox/clang-head/include/c++/v1/istream:686:1: note: candidate function template not viable: no known conversion from 'const int' to 'signed char &' for 2nd argument
operator>>(basic_istream<char, _Traits>& __is, signed char& __c)
^
/opt/wandbox/clang-head/include/c++/v1/istream:1384:1: note: candidate function [with _CharT = char, _Traits = std::__1::char_traits<char>, _Tp = const int &] not viable: no known conversion from 'std::istream' (aka 'basic_istream<char>') to 'basic_istream<char, std::__1::char_traits<char>> &&' for 1st argument
operator>>(basic_istream<_CharT, _Traits>&& __is, _Tp&& __x)
^
prog.cc:8:15: note: candidate function not viable: no known conversion from 'const int' to 'const Hoge' for 2nd argument
std::istream& operator>>(std::istream& is, const Hoge& val) {
^
/opt/wandbox/clang-head/include/c++/v1/istream:643:1: note: candidate template ignored: deduced conflicting types for parameter '_CharT' ('char' vs. 'const int')
operator>>(basic_istream<_CharT, _Traits>& __is, _CharT& __c)
^
/opt/wandbox/clang-head/include/c++/v1/istream:586:1: note: candidate template ignored: could not match '_CharT [_Np]' against 'const int'
operator>>(basic_istream<_CharT, _Traits>& __is, _CharT (&__buf)[_Np])
^
/opt/wandbox/clang-head/include/c++/v1/istream:597:1: note: candidate template ignored: could not match 'unsigned char [_Np]' against 'const int'
operator>>(basic_istream<char, _Traits>& __is, unsigned char (&__buf)[_Np])
^
/opt/wandbox/clang-head/include/c++/v1/istream:605:1: note: candidate template ignored: could not match 'signed char [_Np]' against 'const int'
operator>>(basic_istream<char, _Traits>& __is, signed char (&__buf)[_Np])
^
/opt/wandbox/clang-head/include/c++/v1/istream:1451:1: note: candidate template ignored: could not match 'basic_string<type-parameter-0-0, type-parameter-0-1, type-parameter-0-2>' against 'const int'
operator>>(basic_istream<_CharT, _Traits>& __is,
^
/opt/wandbox/clang-head/include/c++/v1/istream:1591:1: note: candidate template ignored: could not match 'bitset<_Size>' against 'const int'
operator>>(basic_istream<_CharT, _Traits>& __is, bitset<_Size>& __x)
^
/opt/wandbox/clang-head/include/c++/v1/istream:220:20: note: candidate function not viable: no known conversion from 'const int' to 'std::__1::basic_istream<char> &(*)(std::__1::basic_istream<char> &)' for 1st argument
basic_istream& operator>>(basic_istream& (*__pf)(basic_istream&))
^
/opt/wandbox/clang-head/include/c++/v1/istream:224:20: note: candidate function not viable: no known conversion from 'const int' to 'basic_ios<std::__1::basic_istream<char, std::__1::char_traits<char>>::char_type, std::__1::basic_istream<char, std::__1::char_traits<char>>::traits_type> &(*)(basic_ios<std::__1::basic_istream<char, std::__1::char_traits<char>>::char_type, std::__1::basic_istream<char, std::__1::char_traits<char>>::traits_type> &)' (aka 'basic_ios<char, std::__1::char_traits<char>> &(*)(basic_ios<char, std::__1::char_traits<char>> &)') for 1st argument
basic_istream& operator>>(basic_ios<char_type, traits_type>&
^
/opt/wandbox/clang-head/include/c++/v1/istream:229:20: note: candidate function not viable: no known conversion from 'const int' to 'std::__1::ios_base &(*)(std::__1::ios_base &)' for 1st argument
basic_istream& operator>>(ios_base& (*__pf)(ios_base&))
^
/opt/wandbox/clang-head/include/c++/v1/istream:232:20: note: candidate function not viable: no known conversion from 'const int' to 'basic_streambuf<std::__1::basic_istream<char, std::__1::char_traits<char>>::char_type, std::__1::basic_istream<char, std::__1::char_traits<char>>::traits_type> *' (aka 'basic_streambuf<char, std::__1::char_traits<char>> *') for 1st argument
basic_istream& operator>>(basic_streambuf<char_type, traits_type>* __sb);
^
/opt/wandbox/clang-head/include/c++/v1/istream:233:20: note: candidate function not viable: no known conversion from 'const int' to 'bool &' for 1st argument
basic_istream& operator>>(bool& __n);
^
/opt/wandbox/clang-head/include/c++/v1/istream:234:20: note: candidate function not viable: no known conversion from 'const int' to 'short &' for 1st argument
basic_istream& operator>>(short& __n);
^
/opt/wandbox/clang-head/include/c++/v1/istream:235:20: note: candidate function not viable: no known conversion from 'const int' to 'unsigned short &' for 1st argument
basic_istream& operator>>(unsigned short& __n);
^
/opt/wandbox/clang-head/include/c++/v1/istream:236:20: note: candidate function not viable: 1st argument ('const int') would lose const qualifier
basic_istream& operator>>(int& __n);
^
/opt/wandbox/clang-head/include/c++/v1/istream:237:20: note: candidate function not viable: no known conversion from 'const int' to 'unsigned int &' for 1st argument
basic_istream& operator>>(unsigned int& __n);
^
/opt/wandbox/clang-head/include/c++/v1/istream:238:20: note: candidate function not viable: no known conversion from 'const int' to 'long &' for 1st argument
basic_istream& operator>>(long& __n);
^
/opt/wandbox/clang-head/include/c++/v1/istream:239:20: note: candidate function not viable: no known conversion from 'const int' to 'unsigned long &' for 1st argument
basic_istream& operator>>(unsigned long& __n);
^
/opt/wandbox/clang-head/include/c++/v1/istream:240:20: note: candidate function not viable: no known conversion from 'const int' to 'long long &' for 1st argument
basic_istream& operator>>(long long& __n);
^
/opt/wandbox/clang-head/include/c++/v1/istream:241:20: note: candidate function not viable: no known conversion from 'const int' to 'unsigned long long &' for 1st argument
basic_istream& operator>>(unsigned long long& __n);
^
/opt/wandbox/clang-head/include/c++/v1/istream:242:20: note: candidate function not viable: no known conversion from 'const int' to 'float &' for 1st argument
basic_istream& operator>>(float& __f);
^
/opt/wandbox/clang-head/include/c++/v1/istream:243:20: note: candidate function not viable: no known conversion from 'const int' to 'double &' for 1st argument
basic_istream& operator>>(double& __f);
^
/opt/wandbox/clang-head/include/c++/v1/istream:244:20: note: candidate function not viable: no known conversion from 'const int' to 'long double &' for 1st argument
basic_istream& operator>>(long double& __f);
^
/opt/wandbox/clang-head/include/c++/v1/istream:245:20: note: candidate function not viable: no known conversion from 'const int' to 'void *&' for 1st argument
basic_istream& operator>>(void*& __p);
^
1 error generated.
Exit Code:
1