Guest User

Untitled

a guest
Aug 27th, 2020
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 5.51 KB | None | 0 0
  1. $ g++ -c -std=c++17 show.cpp
  2. show.cpp: In instantiation of ‘maybe_either<T>::maybe_either(U&&) [with U = either<var>; T = var]:
  3. show.cpp:24:54:   required from here
  4. show.cpp:15:68: error: no matching function for call to ‘std::variant<var, either<maybe_either<var> > >::variant(either<var>)
  5.          std::variant<T, either<maybe_either<T>>>(std::forward<U>(v)) {
  6.                                                                     ^
  7. In file included from show.cpp:2:0:
  8. /usr/include/c++/7/variant:990:2: note: candidate: template<long unsigned int _Np, class _Up, class ... _Args, class> constexpr std::variant<_Types>::variant(std::in_place_index_t<_Np>, std::initializer_list<_Up>, _Args&& ...)
  9.   variant(in_place_index_t<_Np>, initializer_list<_Up> __il,
  10.   ^~~~~~~
  11. /usr/include/c++/7/variant:990:2: note:   template argument deduction/substitution failed:
  12. show.cpp:15:68: note:   ‘either<var>’ is not derived from ‘std::in_place_index_t<_Idx>
  13.          std::variant<T, either<maybe_either<T>>>(std::forward<U>(v)) {
  14.                                                                     ^
  15. In file included from show.cpp:2:0:
  16. /usr/include/c++/7/variant:981:2: note: candidate: template<long unsigned int _Np, class ... _Args, class> constexpr std::variant<_Types>::variant(std::in_place_index_t<_Np>, _Args&& ...)
  17.   variant(in_place_index_t<_Np>, _Args&&... __args)
  18.   ^~~~~~~
  19. /usr/include/c++/7/variant:981:2: note:   template argument deduction/substitution failed:
  20. show.cpp:15:68: note:   ‘either<var>’ is not derived from ‘std::in_place_index_t<_Idx>
  21.          std::variant<T, either<maybe_either<T>>>(std::forward<U>(v)) {
  22.                                                                     ^
  23. In file included from show.cpp:2:0:
  24. /usr/include/c++/7/variant:971:2: note: candidate: template<class _Tp, class _Up, class ... _Args, class> constexpr std::variant<_Types>::variant(std::in_place_type_t<_Tp>, std::initializer_list<_Up>, _Args&& ...)
  25.   variant(in_place_type_t<_Tp>, initializer_list<_Up> __il,
  26.   ^~~~~~~
  27. /usr/include/c++/7/variant:971:2: note:   template argument deduction/substitution failed:
  28. show.cpp:15:68: note:   ‘either<var>’ is not derived from ‘std::in_place_type_t<_Tp>
  29.          std::variant<T, either<maybe_either<T>>>(std::forward<U>(v)) {
  30.                                                                     ^
  31. In file included from show.cpp:2:0:
  32. /usr/include/c++/7/variant:962:2: note: candidate: template<class _Tp, class ... _Args, class> constexpr std::variant<_Types>::variant(std::in_place_type_t<_Tp>, _Args&& ...)
  33.   variant(in_place_type_t<_Tp>, _Args&&... __args)
  34.   ^~~~~~~
  35. /usr/include/c++/7/variant:962:2: note:   template argument deduction/substitution failed:
  36. show.cpp:15:68: note:   ‘either<var>’ is not derived from ‘std::in_place_type_t<_Tp>
  37.          std::variant<T, either<maybe_either<T>>>(std::forward<U>(v)) {
  38.                                                                     ^
  39. In file included from show.cpp:2:0:
  40. /usr/include/c++/7/variant:953:2: note: candidate: template<class _Tp, class, class, class> constexpr std::variant<_Types>::variant(_Tp&&)
  41.   variant(_Tp&& __t)
  42.   ^~~~~~~
  43. /usr/include/c++/7/variant:953:2: note:   template argument deduction/substitution failed:
  44. /usr/include/c++/7/variant:951:6: error: invalid use of incomplete type ‘struct std::variant<var, either<maybe_either<var> > >::__to_type_impl<18446744073709551615, false>
  45.          typename = enable_if_t<__exactly_once<__accepted_type<_Tp&&>>
  46.                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  47.       && is_constructible_v<__accepted_type<_Tp&&>, _Tp&&>>>
  48.       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  49. /usr/include/c++/7/variant:924:9: note: declaration of ‘struct std::variant<var, either<maybe_either<var> > >::__to_type_impl<18446744073709551615, false>
  50.   struct __to_type_impl;
  51.          ^~~~~~~~~~~~~~
  52. /usr/include/c++/7/variant:951:6: error: invalid use of incomplete type ‘struct std::variant<var, either<maybe_either<var> > >::__to_type_impl<18446744073709551615, false>
  53.          typename = enable_if_t<__exactly_once<__accepted_type<_Tp&&>>
  54.                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  55.       && is_constructible_v<__accepted_type<_Tp&&>, _Tp&&>>>
  56.       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  57. /usr/include/c++/7/variant:924:9: note: declaration of ‘struct std::variant<var, either<maybe_either<var> > >::__to_type_impl<18446744073709551615, false>
  58.   struct __to_type_impl;
  59.          ^~~~~~~~~~~~~~
  60. /usr/include/c++/7/variant:944:7: note: candidate: std::variant<_Types>::variant(std::variant<_Types>&&) [with _Types = {var, either<maybe_either<var> >}]
  61.        variant(variant&&)
  62.        ^~~~~~~
  63. /usr/include/c++/7/variant:944:7: note:   no known conversion for argument 1 from ‘either<var>’ to ‘std::variant<var, either<maybe_either<var> > >&&
  64. /usr/include/c++/7/variant:943:7: note: candidate: std::variant<_Types>::variant(const std::variant<_Types>&) [with _Types = {var, either<maybe_either<var> >}]
  65.        variant(const variant&) = default;
  66.        ^~~~~~~
  67. /usr/include/c++/7/variant:943:7: note:   no known conversion for argument 1 from ‘either<var>’ to ‘const std::variant<var, either<maybe_either<var> > >&
  68. /usr/include/c++/7/variant:941:17: note: candidate: constexpr std::variant<_Types>::variant() [with _Types = {var, either<maybe_either<var> >}]
  69.        constexpr variant()
  70.                  ^~~~~~~
  71. /usr/include/c++/7/variant:941:17: note:   candidate expects 0 arguments, 1 provided
  72.  
Advertisement
Add Comment
Please, Sign In to add comment