Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

about 6 years ago

Language

C++

Compiler

clang 8.0.0

Options
Warnings
Boost 1.70.0
C++17
no pedantic

Author

anonymous

about 6 years ago

$ clang++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.70.0/clang-8.0.0/include -std=c++17
In file included from prog.cc:1:
/opt/wandbox/clang-8.0.0/include/c++/v1/variant:668:1: error: the parameter for this explicitly-defaulted copy constructor is const, but a member or base requires it to be non-const
_LIBCPP_VARIANT_UNION(_Trait::_TriviallyAvailable, ~__union() = default;);
^
/opt/wandbox/clang-8.0.0/include/c++/v1/variant:652:5: note: expanded from macro '_LIBCPP_VARIANT_UNION'
    __union(const __union&) = default;                                         \
    ^
/opt/wandbox/clang-8.0.0/include/c++/v1/variant:716:45: note: in instantiation of template class 'std::__1::__variant_detail::__union<std::__1::__variant_detail::_Trait::_TriviallyAvailable, 0, AClass>' requested here
  __union<_DestructibleTrait, 0, _Types...> __data;
                                            ^
/opt/wandbox/clang-8.0.0/include/c++/v1/variant:749:1: note: in instantiation of template class 'std::__1::__variant_detail::__base<std::__1::__variant_detail::_Trait::_TriviallyAvailable, AClass>' requested here
_LIBCPP_VARIANT_DESTRUCTOR(
^
/opt/wandbox/clang-8.0.0/include/c++/v1/variant:730:16: note: expanded from macro '_LIBCPP_VARIANT_DESTRUCTOR'
      : public __base<destructible_trait, _Types...> {                         \
               ^
/opt/wandbox/clang-8.0.0/include/c++/v1/variant:777:51: note: in instantiation of template class 'std::__1::__variant_detail::__destructor<std::__1::__variant_detail::__traits<AClass>, std::__1::__variant_detail::_Trait::_TriviallyAvailable>' requested here
class _LIBCPP_TEMPLATE_VIS __constructor : public __destructor<_Traits> {
                                                  ^
/opt/wandbox/clang-8.0.0/include/c++/v1/variant:833:1: note: in instantiation of template class 'std::__1::__variant_detail::__constructor<std::__1::__variant_detail::__traits<AClass> >' requested here
_LIBCPP_VARIANT_MOVE_CONSTRUCTOR(
^
/opt/wandbox/clang-8.0.0/include/c++/v1/variant:819:16: note: expanded from macro '_LIBCPP_VARIANT_MOVE_CONSTRUCTOR'
      : public __constructor<__traits<_Types...>> {                            \
               ^
/opt/wandbox/clang-8.0.0/include/c++/v1/variant:884:1: note: in instantiation of template class 'std::__1::__variant_detail::__move_constructor<std::__1::__variant_detail::__traits<AClass>, std::__1::__variant_detail::_Trait::_TriviallyAvailable>' requested here
_LIBCPP_VARIANT_COPY_CONSTRUCTOR(
^
/opt/wandbox/clang-8.0.0/include/c++/v1/variant:859:16: note: expanded from macro '_LIBCPP_VARIANT_COPY_CONSTRUCTOR'
      : public __move_constructor<__traits<_Types...>> {                       \
               ^
/opt/wandbox/clang-8.0.0/include/c++/v1/variant:891:50: note: (skipping 1 context in backtrace; use -ftemplate-backtrace-limit=0 to see all)
class _LIBCPP_TEMPLATE_VIS __assignment : public __copy_constructor<_Traits> {
                                                 ^
/opt/wandbox/clang-8.0.0/include/c++/v1/variant:985:1: note: in instantiation of template class 'std::__1::__variant_detail::__assignment<std::__1::__variant_detail::__traits<AClass> >' requested here
_LIBCPP_VARIANT_MOVE_ASSIGNMENT(
^
/opt/wandbox/clang-8.0.0/include/c++/v1/variant:958:16: note: expanded from macro '_LIBCPP_VARIANT_MOVE_ASSIGNMENT'
      : public __assignment<__traits<_Types...>> {                             \
               ^
/opt/wandbox/clang-8.0.0/include/c++/v1/variant:1024:1: note: in instantiation of template class 'std::__1::__variant_detail::__move_assignment<std::__1::__variant_detail::__traits<AClass>, std::__1::__variant_detail::_Trait::_Unavailable>' requested here
_LIBCPP_VARIANT_COPY_ASSIGNMENT(
^
/opt/wandbox/clang-8.0.0/include/c++/v1/variant:999:16: note: expanded from macro '_LIBCPP_VARIANT_COPY_ASSIGNMENT'
      : public __move_assignment<__traits<_Types...>> {                        \
               ^
/opt/wandbox/clang-8.0.0/include/c++/v1/variant:1032:14: note: in instantiation of template class 'std::__1::__variant_detail::__copy_assignment<std::__1::__variant_detail::__traits<AClass>, std::__1::__variant_detail::_Trait::_Unavailable>' requested here
    : public __copy_assignment<__traits<_Types...>> {
             ^
/opt/wandbox/clang-8.0.0/include/c++/v1/variant:1305:39: note: in instantiation of template class 'std::__1::__variant_detail::__impl<AClass>' requested here
  __variant_detail::__impl<_Types...> __impl;
                                      ^
prog.cc:15:18: note: in instantiation of template class 'std::__1::variant<AClass>' requested here
        variant<AClass> a;
                        ^
1 error generated.
Exit Code:
1