Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 6 years ago

Language

C++

Compiler

clang HEAD 8.0.0 (https://github.com/llvm-mirror/clang.git 0ccf2f537d5fbd909a757be4bbb0cdb6d325d048) (https://github.com/llvm-mirror/llvm.git 24b118cefd35887c024042b75fc2d91af7533ec4)

Options
Warnings
Boost 1.68.0
C++17
no pedantic

Author

anonymous

over 6 years ago

$ clang++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.68.0/clang-head/include -std=c++17
In file included from prog.cc:1:
In file included from /opt/wandbox/clang-head/include/c++/v1/optional:152:
/opt/wandbox/clang-head/include/c++/v1/__functional_base:84:60: error: 'type name' declared as a pointer to a reference of type 'int &'
    static const bool value = !is_same<decltype(__test((_Tp*)0)), __two>::value;
                                                           ^
/opt/wandbox/clang-head/include/c++/v1/__functional_base:102:29: note: in instantiation of template class 'std::__1::__derives_from_unary_function<int &>' requested here
template <class _Tp, bool = __derives_from_unary_function<_Tp>::value>
                            ^
/opt/wandbox/clang-head/include/c++/v1/__functional_base:134:14: note: in instantiation of default argument for '__maybe_derive_from_unary_function<int &>' required here
    : public __maybe_derive_from_unary_function<_Tp>,
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/wandbox/clang-head/include/c++/v1/__functional_base:141:14: note: in instantiation of template class 'std::__1::__weak_result_type_imp<int &, false>' requested here
    : public __weak_result_type_imp<_Tp>
             ^
/opt/wandbox/clang-head/include/c++/v1/__functional_base:376:14: note: in instantiation of template class 'std::__1::__weak_result_type<int &>' requested here
    : public __weak_result_type<_Tp>
             ^
/opt/wandbox/clang-head/include/c++/v1/type_traits:2244:74: note: in instantiation of template class 'std::__1::reference_wrapper<int &>' requested here
        typename __is_destructible_apply<decltype(_VSTD::declval<_Tp1&>().~_Tp1())>::type
                                                                         ^
/opt/wandbox/clang-head/include/c++/v1/type_traits:2250:38: note: (skipping 3 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
    static const bool value = sizeof(__test<_Tp>(12)) == sizeof(char);
                                     ^
/opt/wandbox/clang-head/include/c++/v1/type_traits:2276:14: note: in instantiation of template class 'std::__1::__destructible_false<std::__1::reference_wrapper<int &>, false>' requested here
    : public __destructible_false<_Tp, _VSTD::is_function<_Tp>::value> {};
             ^
/opt/wandbox/clang-head/include/c++/v1/type_traits:3686:38: note: in instantiation of template class 'std::__1::is_destructible<std::__1::reference_wrapper<int &> >' requested here
    : public integral_constant<bool, is_destructible<_Tp>::value && __has_trivial_destructor(_Tp)> {};
                                     ^
/opt/wandbox/clang-head/include/c++/v1/optional:538:5: note: in instantiation of template class 'std::__1::is_trivially_destructible<std::__1::reference_wrapper<int &> >' requested here
    is_trivially_destructible<_Tp>::value &&
    ^
/opt/wandbox/clang-head/include/c++/v1/optional:585:15: note: in instantiation of default argument for '__optional_move_assign_base<std::__1::reference_wrapper<int &> >' required here
    : private __optional_move_assign_base<_Tp>
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
prog.cc:7:47: note: in instantiation of template class 'std::__1::optional<std::__1::reference_wrapper<int &> >' requested here
  std::optional<std::reference_wrapper<int&>> opt = i;
                                              ^
In file included from prog.cc:1:
In file included from /opt/wandbox/clang-head/include/c++/v1/optional:152:
/opt/wandbox/clang-head/include/c++/v1/__functional_base:85:33: error: 'type' declared as a pointer to a reference of type 'int &'
    typedef decltype(__test((_Tp*)0)) type;
                                ^
/opt/wandbox/clang-head/include/c++/v1/__functional_base:98:60: error: 'type name' declared as a pointer to a reference of type 'int &'
    static const bool value = !is_same<decltype(__test((_Tp*)0)), __two>::value;
                                                           ^
/opt/wandbox/clang-head/include/c++/v1/__functional_base:113:29: note: in instantiation of template class 'std::__1::__derives_from_binary_function<int &>' requested here
template <class _Tp, bool = __derives_from_binary_function<_Tp>::value>
                            ^
/opt/wandbox/clang-head/include/c++/v1/__functional_base:135:14: note: in instantiation of default argument for '__maybe_derive_from_binary_function<int &>' required here
      public __maybe_derive_from_binary_function<_Tp>
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/wandbox/clang-head/include/c++/v1/__functional_base:141:14: note: in instantiation of template class 'std::__1::__weak_result_type_imp<int &, false>' requested here
    : public __weak_result_type_imp<_Tp>
             ^
/opt/wandbox/clang-head/include/c++/v1/__functional_base:376:14: note: in instantiation of template class 'std::__1::__weak_result_type<int &>' requested here
    : public __weak_result_type<_Tp>
             ^
/opt/wandbox/clang-head/include/c++/v1/type_traits:2244:74: note: in instantiation of template class 'std::__1::reference_wrapper<int &>' requested here
        typename __is_destructible_apply<decltype(_VSTD::declval<_Tp1&>().~_Tp1())>::type
                                                                         ^
/opt/wandbox/clang-head/include/c++/v1/type_traits:2250:38: note: (skipping 3 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
    static const bool value = sizeof(__test<_Tp>(12)) == sizeof(char);
                                     ^
/opt/wandbox/clang-head/include/c++/v1/type_traits:2276:14: note: in instantiation of template class 'std::__1::__destructible_false<std::__1::reference_wrapper<int &>, false>' requested here
    : public __destructible_false<_Tp, _VSTD::is_function<_Tp>::value> {};
             ^
/opt/wandbox/clang-head/include/c++/v1/type_traits:3686:38: note: in instantiation of template class 'std::__1::is_destructible<std::__1::reference_wrapper<int &> >' requested here
    : public integral_constant<bool, is_destructible<_Tp>::value && __has_trivial_destructor(_Tp)> {};
                                     ^
/opt/wandbox/clang-head/include/c++/v1/optional:538:5: note: in instantiation of template class 'std::__1::is_trivially_destructible<std::__1::reference_wrapper<int &> >' requested here
    is_trivially_destructible<_Tp>::value &&
    ^
/opt/wandbox/clang-head/include/c++/v1/optional:585:15: note: in instantiation of default argument for '__optional_move_assign_base<std::__1::reference_wrapper<int &> >' required here
    : private __optional_move_assign_base<_Tp>
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
prog.cc:7:47: note: in instantiation of template class 'std::__1::optional<std::__1::reference_wrapper<int &> >' requested here
  std::optional<std::reference_wrapper<int&>> opt = i;
                                              ^
In file included from prog.cc:1:
In file included from /opt/wandbox/clang-head/include/c++/v1/optional:152:
/opt/wandbox/clang-head/include/c++/v1/__functional_base:99:33: error: 'type' declared as a pointer to a reference of type 'int &'
    typedef decltype(__test((_Tp*)0)) type;
                                ^
/opt/wandbox/clang-head/include/c++/v1/__functional_base:382:9: error: '__f_' declared as a pointer to a reference of type 'std::__1::reference_wrapper<int &>::type' (aka 'int &')
    type* __f_;
        ^
/opt/wandbox/clang-head/include/c++/v1/type_traits:2244:74: note: in instantiation of template class 'std::__1::reference_wrapper<int &>' requested here
        typename __is_destructible_apply<decltype(_VSTD::declval<_Tp1&>().~_Tp1())>::type
                                                                         ^
/opt/wandbox/clang-head/include/c++/v1/type_traits:2250:38: note: while substituting explicitly-specified template arguments into function template '__test' 
    static const bool value = sizeof(__test<_Tp>(12)) == sizeof(char);
                                     ^
/opt/wandbox/clang-head/include/c++/v1/type_traits:2259:9: note: in instantiation of template class 'std::__1::__is_destructor_wellformed<std::__1::reference_wrapper<int &> >' requested here
        __is_destructor_wellformed<typename _VSTD::remove_all_extents<_Tp>::type>::value> {};
        ^
/opt/wandbox/clang-head/include/c++/v1/type_traits:2269:50: note: in instantiation of template class 'std::__1::__destructible_imp<std::__1::reference_wrapper<int &>, false>' requested here
struct __destructible_false<_Tp, false> : public __destructible_imp<_Tp, _VSTD::is_reference<_Tp>::value> {};
                                                 ^
/opt/wandbox/clang-head/include/c++/v1/type_traits:2276:14: note: in instantiation of template class 'std::__1::__destructible_false<std::__1::reference_wrapper<int &>, false>' requested here
    : public __destructible_false<_Tp, _VSTD::is_function<_Tp>::value> {};
             ^
/opt/wandbox/clang-head/include/c++/v1/type_traits:3686:38: note: in instantiation of template class 'std::__1::is_destructible<std::__1::reference_wrapper<int &> >' requested here
    : public integral_constant<bool, is_destructible<_Tp>::value && __has_trivial_destructor(_Tp)> {};
                                     ^
/opt/wandbox/clang-head/include/c++/v1/optional:538:5: note: in instantiation of template class 'std::__1::is_trivially_destructible<std::__1::reference_wrapper<int &> >' requested here
    is_trivially_destructible<_Tp>::value &&
    ^
/opt/wandbox/clang-head/include/c++/v1/optional:585:15: note: in instantiation of default argument for '__optional_move_assign_base<std::__1::reference_wrapper<int &> >' required here
    : private __optional_move_assign_base<_Tp>
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
prog.cc:7:47: note: in instantiation of template class 'std::__1::optional<std::__1::reference_wrapper<int &> >' requested here
  std::optional<std::reference_wrapper<int&>> opt = i;
                                              ^
In file included from prog.cc:1:
In file included from /opt/wandbox/clang-head/include/c++/v1/optional:152:
/opt/wandbox/clang-head/include/c++/v1/__functional_base:389:14: error: 'reference_wrapper' is missing exception specification 'noexcept'
    private: reference_wrapper(type&&); public: // = delete; // do not bind to temps
             ^
/opt/wandbox/clang-head/include/c++/v1/__functional_base:386:31: note: previous declaration is here
    _LIBCPP_INLINE_VISIBILITY reference_wrapper(type& __f) _NOEXCEPT
                              ^
In file included from prog.cc:1:
/opt/wandbox/clang-head/include/c++/v1/optional:601:5: error: static_assert failed due to requirement 'is_destructible_v<std::__1::optional<std::__1::reference_wrapper<int &> >::value_type>' "instantiation of optional with a non-destructible type is ill-formed"
    static_assert(is_destructible_v<value_type>,
    ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
prog.cc:7:47: note: in instantiation of template class 'std::__1::optional<std::__1::reference_wrapper<int &> >' requested here
  std::optional<std::reference_wrapper<int&>> opt = i;
                                              ^
7 errors generated.
Exit Code:
1