Skip to content

Instantly share code, notes, and snippets.

@EricWF
Created August 30, 2016 00:03
Show Gist options
  • Select an option

  • Save EricWF/410053faeb9e104aec1440ae634898d0 to your computer and use it in GitHub Desktop.

Select an option

Save EricWF/410053faeb9e104aec1440ae634898d0 to your computer and use it in GitHub Desktop.
In file included from test.pass.cpp:3:
In file included from /opt/gcc-tot/include/c++/7.0.0/tuple:38:
In file included from /opt/gcc-tot/include/c++/7.0.0/utility:70:
In file included from /opt/gcc-tot/include/c++/7.0.0/bits/stl_pair.h:59:
In file included from /opt/gcc-tot/include/c++/7.0.0/bits/move.h:57:
/opt/gcc-tot/include/c++/7.0.0/type_traits:139:14: error: base class has incomplete type
: public _B1
~~~~~~~^~~
/opt/gcc-tot/include/c++/7.0.0/tuple:485:14: note: in instantiation of template class 'std::__and_<std::is_constructible<dynamic, Optional<std::tuple<dynamic> > &&> >' requested here
return __and_<is_constructible<_Elements, _UElements&&>...>::value;
^
/opt/gcc-tot/include/c++/7.0.0/tuple:641:21: note: in instantiation of function template specialization 'std::_TC<true, dynamic>::_MoveConstructibleTuple<Optional<std::tuple<dynamic> >
>' requested here
_MoveConstructibleTuple<_UElements...>()
^
/opt/gcc-tot/include/c++/7.0.0/tuple:646:19: note: while substituting prior template arguments into non-type template parameter [with _UElements = <Optional<std::tuple<dynamic> >>]
constexpr tuple(_UElements&&... __elements)
^~~~~
/opt/gcc-tot/include/c++/7.0.0/type_traits:976:28: note: while substituting deduced template arguments into function template 'tuple' [with _UElements = <Optional<std::tuple<dynamic>
>>, $1 = (no value)]
= decltype(::new _Tp(declval<_Arg>()))>
^
/opt/gcc-tot/include/c++/7.0.0/type_traits:977:24: note: in instantiation of default argument for '__test<dynamic, Optional<std::tuple<dynamic> > &&>' required here
static true_type __test(int);
^~~~~~~~~~~
/opt/gcc-tot/include/c++/7.0.0/type_traits:987:24: note: (skipping 3 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
typedef decltype(__test<_Tp, _Arg>(0)) type;
^
/opt/gcc-tot/include/c++/7.0.0/type_traits:1070:14: note: in instantiation of template class 'std::__is_direct_constructible_new_safe<dynamic, Optional<std::tuple<dynamic> > &&>'
requested here
: public conditional<is_reference<_Tp>::value,
^
/opt/gcc-tot/include/c++/7.0.0/type_traits:1078:14: note: in instantiation of template class 'std::__is_direct_constructible_new<dynamic, Optional<std::tuple<dynamic> > &&>' requested
here
: public __is_direct_constructible_new<_Tp, _Arg>::type
^
/opt/gcc-tot/include/c++/7.0.0/type_traits:1118:14: note: in instantiation of template class 'std::__is_direct_constructible<dynamic, Optional<std::tuple<dynamic> > &&>' requested here
: public __is_direct_constructible<_Tp, _Arg>
^
/opt/gcc-tot/include/c++/7.0.0/type_traits:1129:14: note: in instantiation of template class 'std::__is_constructible_impl<dynamic, Optional<std::tuple<dynamic> > &&>' requested here
: public __is_constructible_impl<_Tp, _Args...>::type
^
test.pass.cpp:19:24: note: in instantiation of template class 'std::is_constructible<dynamic, Optional<std::tuple<dynamic> > &&>' requested here
static_assert(std::is_constructible<dynamic, Optional<std::tuple<dynamic>>&&>::value, "");
^
/opt/gcc-tot/include/c++/7.0.0/type_traits:1128:12: note: definition of 'std::is_constructible<dynamic, Optional<std::tuple<dynamic> > &&>' is not complete until the closing '}'
struct is_constructible
^
1 error generated.
// repro.cpp
// this is minimized code from folly library
#include<tuple>
template<class Value>
struct Optional {
Optional() = default;
// implicit
Optional(const Value&) {}
};
struct dynamic {
// implicit
template<class T> dynamic(T) {}
};
Optional<std::tuple<dynamic>> get() { return {}; }
int main() {
static_assert(std::is_constructible<dynamic, Optional<std::tuple<dynamic>>&&>::value, "");
auto x = get();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment