Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 5 years ago

Language

C++

Compiler

clang HEAD 11.0.0 (https://github.com/llvm/llvm-project.git 8df173f399d89c6c0f600ece6c0aa08f7cad61a6)

Options
Warnings
Boost 1.70.0
C++2a(GNU)
no pedantic

Author

anonymous

over 5 years ago

$ clang++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.70.0/clang-head/include -std=gnu++2a
prog.cc:5:39: error: no member named 'std' in namespace 'std'; did you mean simply 'std'?
    inline std::wostream & operator<<(std::std::wostream & stm, int a)
                                      ^~~~~~~~
                                      std
/opt/wandbox/clang-head/include/c++/v1/iostream:46:1: note: 'std' declared here
_LIBCPP_BEGIN_NAMESPACE_STD
^
/opt/wandbox/clang-head/include/c++/v1/__config:784:47: note: expanded from macro '_LIBCPP_BEGIN_NAMESPACE_STD'
#define _LIBCPP_BEGIN_NAMESPACE_STD namespace std { inline namespace _LIBCPP_ABI_NAMESPACE {
                                              ^
prog.cc:7:9: error: use of undeclared identifier 'stream'; did you mean 'strcat'?
        stream << L"int";
        ^~~~~~
        strcat
/usr/include/string.h:133:14: note: 'strcat' declared here
extern char *strcat (char *__restrict __dest, const char *__restrict __src)
             ^
prog.cc:7:16: error: invalid operands to binary expression ('char *(char *__restrict, const char *__restrict) throw()' and 'const wchar_t [4]')
        stream << L"int";
        ~~~~~~ ^  ~~~~~~
prog.cc:5:69: warning: unused parameter 'a' [-Wunused-parameter]
    inline std::wostream & operator<<(std::std::wostream & stm, int a)
                                                                    ^
prog.cc:19:74: warning: unused parameter 'msg' [-Wunused-parameter]
inline std::wostream & operator << (std::wostream & stream, const Y::A & msg)
                                                                         ^
prog.cc:30:20: error: invalid operands to binary expression ('std::__1::wostream' (aka 'basic_ostream<wchar_t>') and 'Y::A')
        std::wcout << a;
        ~~~~~~~~~~ ^  ~
/opt/wandbox/clang-head/include/c++/v1/type_traits:4056:3: note: candidate function template not viable: no known conversion from 'std::__1::wostream' (aka 'basic_ostream<wchar_t>') to 'std::byte' for 1st argument
  operator<< (byte  __lhs, _Integer __shift) noexcept
  ^
/opt/wandbox/clang-head/include/c++/v1/ostream:760:1: note: candidate function template not viable: no known conversion from 'Y::A' to 'char' for 2nd argument
operator<<(basic_ostream<_CharT, _Traits>& __os, char __cn)
^
/opt/wandbox/clang-head/include/c++/v1/ostream:821:1: note: candidate function template not viable: no known conversion from 'Y::A' to 'const char *' for 2nd argument
operator<<(basic_ostream<_CharT, _Traits>& __os, const char* __strn)
^
/opt/wandbox/clang-head/include/c++/v1/ostream:1066:1: note: candidate function template not viable: no known conversion from 'Y::A' to 'const std::__1::error_code' for 2nd argument
operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __ec)
^
prog.cc:5:28: note: candidate function not viable: no known conversion from 'Y::A' to 'int' for 2nd argument
    inline std::wostream & operator<<(std::std::wostream & stm, int a)
                           ^
/opt/wandbox/clang-head/include/c++/v1/ostream:753:1: note: candidate template ignored: deduced conflicting types for parameter '_CharT' ('wchar_t' vs. 'Y::A')
operator<<(basic_ostream<_CharT, _Traits>& __os, _CharT __c)
^
/opt/wandbox/clang-head/include/c++/v1/ostream:793:1: note: candidate template ignored: could not match 'char' against 'wchar_t'
operator<<(basic_ostream<char, _Traits>& __os, char __c)
^
/opt/wandbox/clang-head/include/c++/v1/ostream:800:1: note: candidate template ignored: could not match 'char' against 'wchar_t'
operator<<(basic_ostream<char, _Traits>& __os, signed char __c)
^
/opt/wandbox/clang-head/include/c++/v1/ostream:807:1: note: candidate template ignored: could not match 'char' against 'wchar_t'
operator<<(basic_ostream<char, _Traits>& __os, unsigned char __c)
^
/opt/wandbox/clang-head/include/c++/v1/ostream:814:1: note: candidate template ignored: could not match 'const _CharT *' against 'Y::A'
operator<<(basic_ostream<_CharT, _Traits>& __os, const _CharT* __str)
^
/opt/wandbox/clang-head/include/c++/v1/ostream:867:1: note: candidate template ignored: could not match 'char' against 'wchar_t'
operator<<(basic_ostream<char, _Traits>& __os, const char* __str)
^
/opt/wandbox/clang-head/include/c++/v1/ostream:874:1: note: candidate template ignored: could not match 'char' against 'wchar_t'
operator<<(basic_ostream<char, _Traits>& __os, const signed char* __str)
^
/opt/wandbox/clang-head/include/c++/v1/ostream:882:1: note: candidate template ignored: could not match 'char' against 'wchar_t'
operator<<(basic_ostream<char, _Traits>& __os, const unsigned char* __str)
^
/opt/wandbox/clang-head/include/c++/v1/ostream:1049:1: note: candidate template ignored: could not match 'basic_string<type-parameter-0-0, type-parameter-0-1, type-parameter-0-2>' against 'Y::A'
operator<<(basic_ostream<_CharT, _Traits>& __os,
^
/opt/wandbox/clang-head/include/c++/v1/ostream:1057:1: note: candidate template ignored: could not match 'basic_string_view<type-parameter-0-0, type-parameter-0-1>' against 'Y::A'
operator<<(basic_ostream<_CharT, _Traits>& __os,
^
/opt/wandbox/clang-head/include/c++/v1/ostream:1074:1: note: candidate template ignored: could not match 'shared_ptr<type-parameter-0-2>' against 'Y::A'
operator<<(basic_ostream<_CharT, _Traits>& __os, shared_ptr<_Yp> const& __p)
^
/opt/wandbox/clang-head/include/c++/v1/ostream:1093:1: note: candidate template ignored: could not match 'bitset<_Size>' against 'Y::A'
operator<<(basic_ostream<_CharT, _Traits>& __os, const bitset<_Size>& __x)
^
/opt/wandbox/clang-head/include/c++/v1/ostream:1039:1: note: candidate template ignored: requirement '!is_lvalue_reference<std::__1::basic_ostream<wchar_t, std::__1::char_traits<wchar_t> > &>::value' was not satisfied [with _Stream = std::__1::basic_ostream<wchar_t> &, _Tp = Y::A]
operator<<(_Stream&& __os, const _Tp& __x)
^
/opt/wandbox/clang-head/include/c++/v1/ostream:1086:1: note: candidate template ignored: could not match 'unique_ptr<type-parameter-0-2, type-parameter-0-3>' against 'Y::A'
operator<<(basic_ostream<_CharT, _Traits>& __os, unique_ptr<_Yp, _Dp> const& __p)
^
/opt/wandbox/clang-head/include/c++/v1/ostream:195:20: note: candidate function not viable: no known conversion from 'Y::A' to 'std::__1::basic_ostream<wchar_t> &(*)(std::__1::basic_ostream<wchar_t> &)' for 1st argument
    basic_ostream& operator<<(basic_ostream& (*__pf)(basic_ostream&))
                   ^
/opt/wandbox/clang-head/include/c++/v1/ostream:199:20: note: candidate function not viable: no known conversion from 'Y::A' to 'basic_ios<std::__1::basic_ostream<wchar_t, std::__1::char_traits<wchar_t> >::char_type, std::__1::basic_ostream<wchar_t, std::__1::char_traits<wchar_t> >::traits_type> &(*)(basic_ios<std::__1::basic_ostream<wchar_t, std::__1::char_traits<wchar_t> >::char_type, std::__1::basic_ostream<wchar_t, std::__1::char_traits<wchar_t> >::traits_type> &)' (aka 'basic_ios<wchar_t, std::__1::char_traits<wchar_t> > &(*)(basic_ios<wchar_t, std::__1::char_traits<wchar_t> > &)') for 1st argument
    basic_ostream& operator<<(basic_ios<char_type, traits_type>&
                   ^
/opt/wandbox/clang-head/include/c++/v1/ostream:204:20: note: candidate function not viable: no known conversion from 'Y::A' to 'std::__1::ios_base &(*)(std::__1::ios_base &)' for 1st argument
    basic_ostream& operator<<(ios_base& (*__pf)(ios_base&))
                   ^
/opt/wandbox/clang-head/include/c++/v1/ostream:207:20: note: candidate function not viable: no known conversion from 'Y::A' to 'bool' for 1st argument
    basic_ostream& operator<<(bool __n);
                   ^
/opt/wandbox/clang-head/include/c++/v1/ostream:208:20: note: candidate function not viable: no known conversion from 'Y::A' to 'short' for 1st argument
    basic_ostream& operator<<(short __n);
                   ^
/opt/wandbox/clang-head/include/c++/v1/ostream:209:20: note: candidate function not viable: no known conversion from 'Y::A' to 'unsigned short' for 1st argument
    basic_ostream& operator<<(unsigned short __n);
                   ^
/opt/wandbox/clang-head/include/c++/v1/ostream:210:20: note: candidate function not viable: no known conversion from 'Y::A' to 'int' for 1st argument
    basic_ostream& operator<<(int __n);
                   ^
/opt/wandbox/clang-head/include/c++/v1/ostream:211:20: note: candidate function not viable: no known conversion from 'Y::A' to 'unsigned int' for 1st argument
    basic_ostream& operator<<(unsigned int __n);
                   ^
/opt/wandbox/clang-head/include/c++/v1/ostream:212:20: note: candidate function not viable: no known conversion from 'Y::A' to 'long' for 1st argument
    basic_ostream& operator<<(long __n);
                   ^
/opt/wandbox/clang-head/include/c++/v1/ostream:213:20: note: candidate function not viable: no known conversion from 'Y::A' to 'unsigned long' for 1st argument
    basic_ostream& operator<<(unsigned long __n);
                   ^
/opt/wandbox/clang-head/include/c++/v1/ostream:214:20: note: candidate function not viable: no known conversion from 'Y::A' to 'long long' for 1st argument
    basic_ostream& operator<<(long long __n);
                   ^
/opt/wandbox/clang-head/include/c++/v1/ostream:215:20: note: candidate function not viable: no known conversion from 'Y::A' to 'unsigned long long' for 1st argument
    basic_ostream& operator<<(unsigned long long __n);
                   ^
/opt/wandbox/clang-head/include/c++/v1/ostream:216:20: note: candidate function not viable: no known conversion from 'Y::A' to 'float' for 1st argument
    basic_ostream& operator<<(float __f);
                   ^
/opt/wandbox/clang-head/include/c++/v1/ostream:217:20: note: candidate function not viable: no known conversion from 'Y::A' to 'double' for 1st argument
    basic_ostream& operator<<(double __f);
                   ^
/opt/wandbox/clang-head/include/c++/v1/ostream:218:20: note: candidate function not viable: no known conversion from 'Y::A' to 'long double' for 1st argument
    basic_ostream& operator<<(long double __f);
                   ^
/opt/wandbox/clang-head/include/c++/v1/ostream:219:20: note: candidate function not viable: no known conversion from 'Y::A' to 'const void *' for 1st argument; take the address of the argument with &
    basic_ostream& operator<<(const void* __p);
                   ^
/opt/wandbox/clang-head/include/c++/v1/ostream:220:20: note: candidate function not viable: no known conversion from 'Y::A' to 'basic_streambuf<std::__1::basic_ostream<wchar_t, std::__1::char_traits<wchar_t> >::char_type, std::__1::basic_ostream<wchar_t, std::__1::char_traits<wchar_t> >::traits_type> *' (aka 'basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> > *') for 1st argument
    basic_ostream& operator<<(basic_streambuf<char_type, traits_type>* __sb);
                   ^
/opt/wandbox/clang-head/include/c++/v1/ostream:223:20: note: candidate function not viable: no known conversion from 'Y::A' to 'std::nullptr_t' (aka 'nullptr_t') for 1st argument
    basic_ostream& operator<<(nullptr_t)
                   ^
2 warnings and 4 errors generated.
Exit Code:
1