Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 7 years ago

Language

C++

Compiler

clang 6.0.1

Options
Warnings
Boost 1.67.0
C++17
no pedantic

Author

anonymous

over 7 years ago

$ clang++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.67.0/clang-6.0.1/include -std=c++17
In file included from prog.cc:4:
/opt/wandbox/te/include/boost/te.hpp:247:10: error: call to deleted constructor of 'std::__1::basic_ostream<char>'
  return reinterpret_cast<R (*)(void *, Ts...)>(self.vptr[N - 1])(
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/wandbox/te/include/boost/te.hpp:271:18: note: in instantiation of function template specialization 'boost::te::v1::detail::call_impl<Drawable, 1, std::__1::basic_ostream<char> &, (lambda at prog.cc:12:36), std::__1::basic_ostream<char> &>' requested here
  return detail::call_impl<I>(
                 ^
prog.cc:12:16: note: in instantiation of function template specialization 'boost::te::v1::call<std::__1::basic_ostream<char> &, 0, (lambda at prog.cc:12:36), Drawable, std::__1::basic_ostream<char> &>' requested here
    return te::call<std::ostream&>([](auto const& self, auto& out) { self.draw(out); }, *this, out);
               ^
/opt/wandbox/clang-6.0.1/include/c++/v1/ostream:181:5: note: 'basic_ostream' has been explicitly marked deleted here
    basic_ostream           (const basic_ostream& __rhs) = delete;
    ^
prog.cc:12:12: error: non-const lvalue reference to type 'basic_ostream<...>' cannot bind to a temporary of type 'basic_ostream<...>'
    return te::call<std::ostream&>([](auto const& self, auto& out) { self.draw(out); }, *this, out);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
Exit Code:
1