Author
anonymous
over 6 years ago
Language
C++
Compiler
clang 6.0.1
Options
Warnings
Don't Use Boost
C++17
-pedantic-errors
Raw compiler options
-Werror
Author
anonymous
over 6 years ago
$ clang++ prog.cc -Wall -Wextra -std=c++17 -pedantic-errors -Werror
prog.cc:7:23: error: invalid operands to binary expression ('basic_ostream<char, std::__1::char_traits<char> >' and 'std::byte')
std::cout << "x=" << x << "\n";
~~~~~~~~~~~~~~~~~ ^ ~
/opt/wandbox/clang-6.0.1/include/c++/v1/ostream:218:20: note: candidate function not viable: no known conversion from 'std::byte' to 'const void *' for 1st argument; take the address of the argument with &
basic_ostream& operator<<(const void* __p);
^
/opt/wandbox/clang-6.0.1/include/c++/v1/type_traits:4957:3: note: candidate function not viable: no known conversion from 'basic_ostream<char, std::__1::char_traits<char> >' to 'std::byte' for 1st argument
operator<< (byte __lhs, _Integer __shift) noexcept
^
/opt/wandbox/clang-6.0.1/include/c++/v1/ostream:194:20: note: candidate function not viable: no known conversion from 'std::byte' to 'std::__1::basic_ostream<char> &(*)(std::__1::basic_ostream<char> &)' for 1st argument
basic_ostream& operator<<(basic_ostream& (*__pf)(basic_ostream&))
^
/opt/wandbox/clang-6.0.1/include/c++/v1/ostream:198:20: note: candidate function not viable: no known conversion from 'std::byte' to 'basic_ios<std::__1::basic_ostream<char, std::__1::char_traits<char> >::char_type, std::__1::basic_ostream<char, std::__1::char_traits<char> >::traits_type> &(*)(basic_ios<std::__1::basic_ostream<char, std::__1::char_traits<char> >::char_type, std::__1::basic_ostream<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_ostream& operator<<(basic_ios<char_type, traits_type>&
^
/opt/wandbox/clang-6.0.1/include/c++/v1/ostream:203:20: note: candidate function not viable: no known conversion from 'std::byte' to 'std::__1::ios_base &(*)(std::__1::ios_base &)' for 1st argument
basic_ostream& operator<<(ios_base& (*__pf)(ios_base&))
^
/opt/wandbox/clang-6.0.1/include/c++/v1/ostream:206:20: note: candidate function not viable: no known conversion from 'std::byte' to 'bool' for 1st argument
basic_ostream& operator<<(bool __n);
^
/opt/wandbox/clang-6.0.1/include/c++/v1/ostream:207:20: note: candidate function not viable: no known conversion from 'std::byte' to 'short' for 1st argument
basic_ostream& operator<<(short __n);
^
/opt/wandbox/clang-6.0.1/include/c++/v1/ostream:208:20: note: candidate function not viable: no known conversion from 'std::byte' to 'unsigned short' for 1st argument
basic_ostream& operator<<(unsigned short __n);
^
/opt/wandbox/clang-6.0.1/include/c++/v1/ostream:209:20: note: candidate function not viable: no known conversion from 'std::byte' to 'int' for 1st argument
basic_ostream& operator<<(int __n);
^
/opt/wandbox/clang-6.0.1/include/c++/v1/ostream:210:20: note: candidate function not viable: no known conversion from 'std::byte' to 'unsigned int' for 1st argument
basic_ostream& operator<<(unsigned int __n);
^
/opt/wandbox/clang-6.0.1/include/c++/v1/ostream:211:20: note: candidate function not viable: no known conversion from 'std::byte' to 'long' for 1st argument
basic_ostream& operator<<(long __n);
^
/opt/wandbox/clang-6.0.1/include/c++/v1/ostream:212:20: note: candidate function not viable: no known conversion from 'std::byte' to 'unsigned long' for 1st argument
basic_ostream& operator<<(unsigned long __n);
^
/opt/wandbox/clang-6.0.1/include/c++/v1/ostream:213:20: note: candidate function not viable: no known conversion from 'std::byte' to 'long long' for 1st argument
basic_ostream& operator<<(long long __n);
^
/opt/wandbox/clang-6.0.1/include/c++/v1/ostream:214:20: note: candidate function not viable: no known conversion from 'std::byte' to 'unsigned long long' for 1st argument
basic_ostream& operator<<(unsigned long long __n);
^
/opt/wandbox/clang-6.0.1/include/c++/v1/ostream:215:20: note: candidate function not viable: no known conversion from 'std::byte' to 'float' for 1st argument
basic_ostream& operator<<(float __f);
^
/opt/wandbox/clang-6.0.1/include/c++/v1/ostream:216:20: note: candidate function not viable: no known conversion from 'std::byte' to 'double' for 1st argument
basic_ostream& operator<<(double __f);
^
/opt/wandbox/clang-6.0.1/include/c++/v1/ostream:217:20: note: candidate function not viable: no known conversion from 'std::byte' to 'long double' for 1st argument
basic_ostream& operator<<(long double __f);
^
/opt/wandbox/clang-6.0.1/include/c++/v1/ostream:219:20: note: candidate function not viable: no known conversion from 'std::byte' to 'basic_streambuf<std::__1::basic_ostream<char, std::__1::char_traits<char> >::char_type, std::__1::basic_ostream<char, std::__1::char_traits<char> >::traits_type> *' (aka 'basic_streambuf<char, std::__1::char_traits<char> > *') for 1st argument
basic_ostream& operator<<(basic_streambuf<char_type, traits_type>* __sb);
^
/opt/wandbox/clang-6.0.1/include/c++/v1/ostream:755:1: note: candidate function not viable: no known conversion from 'std::byte' to 'char' for 2nd argument
operator<<(basic_ostream<_CharT, _Traits>& __os, char __cn)
^
/opt/wandbox/clang-6.0.1/include/c++/v1/ostream:788:1: note: candidate function not viable: no known conversion from 'std::byte' to 'char' for 2nd argument
operator<<(basic_ostream<char, _Traits>& __os, char __c)
^
/opt/wandbox/clang-6.0.1/include/c++/v1/ostream:795:1: note: candidate function not viable: no known conversion from 'std::byte' to 'signed char' for 2nd argument
operator<<(basic_ostream<char, _Traits>& __os, signed char __c)
^
/opt/wandbox/clang-6.0.1/include/c++/v1/ostream:802:1: note: candidate function not viable: no known conversion from 'std::byte' to 'unsigned char' for 2nd argument
operator<<(basic_ostream<char, _Traits>& __os, unsigned char __c)
^
/opt/wandbox/clang-6.0.1/include/c++/v1/ostream:816:1: note: candidate function not viable: no known conversion from 'std::byte' to 'const char *' for 2nd argument
operator<<(basic_ostream<_CharT, _Traits>& __os, const char* __strn)
^
/opt/wandbox/clang-6.0.1/include/c++/v1/ostream:862:1: note: candidate function not viable: no known conversion from 'std::byte' to 'const char *' for 2nd argument
operator<<(basic_ostream<char, _Traits>& __os, const char* __str)
^
/opt/wandbox/clang-6.0.1/include/c++/v1/ostream:869:1: note: candidate function not viable: no known conversion from 'std::byte' to 'const signed char *' for 2nd argument
operator<<(basic_ostream<char, _Traits>& __os, const signed char* __str)
^
/opt/wandbox/clang-6.0.1/include/c++/v1/ostream:877:1: note: candidate function not viable: no known conversion from 'std::byte' to 'const unsigned char *' for 2nd argument
operator<<(basic_ostream<char, _Traits>& __os, const unsigned char* __str)
^
/opt/wandbox/clang-6.0.1/include/c++/v1/ostream:1061:1: note: candidate function not viable: no known conversion from 'std::byte' to 'const std::__1::error_code' for 2nd argument
operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __ec)
^
/opt/wandbox/clang-6.0.1/include/c++/v1/ostream:748:1: note: candidate template ignored: deduced conflicting types for parameter '_CharT' ('char' vs. 'std::byte')
operator<<(basic_ostream<_CharT, _Traits>& __os, _CharT __c)
^
/opt/wandbox/clang-6.0.1/include/c++/v1/ostream:809:1: note: candidate template ignored: could not match 'const _CharT *' against 'std::byte'
operator<<(basic_ostream<_CharT, _Traits>& __os, const _CharT* __str)
^
/opt/wandbox/clang-6.0.1/include/c++/v1/ostream:1044:1: note: candidate template ignored: could not match 'basic_string<type-parameter-0-0, type-parameter-0-1, type-parameter-0-2>' against 'std::byte'
operator<<(basic_ostream<_CharT, _Traits>& __os,
^
/opt/wandbox/clang-6.0.1/include/c++/v1/ostream:1052:1: note: candidate template ignored: could not match 'basic_string_view<type-parameter-0-0, type-parameter-0-1>' against 'std::byte'
operator<<(basic_ostream<_CharT, _Traits>& __os,
^
/opt/wandbox/clang-6.0.1/include/c++/v1/ostream:1069:1: note: candidate template ignored: could not match 'shared_ptr<type-parameter-0-2>' against 'std::byte'
operator<<(basic_ostream<_CharT, _Traits>& __os, shared_ptr<_Yp> const& __p)
^
/opt/wandbox/clang-6.0.1/include/c++/v1/ostream:1082:1: note: candidate template ignored: could not match 'unique_ptr<type-parameter-0-2, type-parameter-0-3>' against 'std::byte'
operator<<(basic_ostream<_CharT, _Traits>& __os, unique_ptr<_Yp, _Dp> const& __p)
^
/opt/wandbox/clang-6.0.1/include/c++/v1/ostream:1090:1: note: candidate template ignored: could not match 'bitset<_Size>' against 'std::byte'
operator<<(basic_ostream<_CharT, _Traits>& __os, const bitset<_Size>& __x)
^
/opt/wandbox/clang-6.0.1/include/c++/v1/ostream:1034:1: note: candidate template ignored: requirement '!is_lvalue_reference<basic_ostream<char> &>::value' was not satisfied [with _Stream = std::__1::basic_ostream<char> &, _Tp = std::byte]
operator<<(_Stream&& __os, const _Tp& __x)
^
1 error generated.
Exit Code:
1