public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "trippels at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/67686] [concepts] segfault in finish_call_expr function Date: Wed, 23 Sep 2015 07:53:00 -0000 [thread overview] Message-ID: <bug-67686-4-2bwfl3NAWL@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-67686-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67686 Markus Trippelsdorf <trippels at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2015-09-23 CC| |trippels at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> --- This is what creduce came up with: typedef int size_t; template <typename> struct is_copy_constructible; template <typename> struct remove_reference; template <typename _Tp> struct remove_reference<_Tp &> { typedef _Tp type; }; template <typename> void forward(); template <size_t... _Indexes> struct A { typedef A<0, sizeof...(_Indexes)> __next; }; template <size_t _Num> struct B { typedef typename B<_Num - 1>::__type::__next __type; }; template <> struct B<0> { typedef A<> __type; }; template <typename _Tp, _Tp...> struct C; template <typename, typename = B<1>::__type> struct D; template <typename _Tp, size_t... _Idx> struct D<_Tp, A<_Idx...>> { typedef C<_Tp, _Idx...> __type; }; template <typename _Tp, _Tp> using make_integer_sequence = typename D<_Tp>::__type; template <size_t... _Idx> using index_sequence = C<size_t, _Idx...>; template <size_t> using make_index_sequence = make_integer_sequence<size_t, 0>; template <int> void and_c(); template <class X> concept bool cpt_CopyConstructible() { return is_copy_constructible<X>::value; } template <class T> using uncvref_t = typename remove_reference<T>::type; template <class...> class Tuple {}; auto make_tuple() { return Tuple<>(); } template <class> size_t num_elements; template <class... Values> constexpr size_t num_elements<Tuple<Values...>> = sizeof...(Values); template <size_t, class... TupleForwards> concept bool cpt_MappableElement() { return requires(TupleForwards... tuples){requires cpt_CopyConstructible< decltype(forward(forward<TupleForwards>(tuples)...))>()}; } template <class...> int mappable_elements; template <int... Indexes, class Functor, class... TupleForwards> int mappable_elements<index_sequence<Indexes...>, Functor, TupleForwards...> = and_c<cpt_MappableElement<Indexes>()...>; template <class...> int mappable_impl; template <class Functor, class TupleForwardFirst, class... TupleForwardsRest> int mappable_impl<Functor, TupleForwardFirst, TupleForwardsRest...> = mappable_elements< make_index_sequence<num_elements<uncvref_t<TupleForwardFirst>>>, TupleForwardFirst>; template <class Functor, class... TupleForwards> concept bool cpt_Mappable() { return mappable_impl<Functor, TupleForwards...>; } cpt_Mappable { Functor, ... TupleForwards } auto map(Functor, TupleForwards &&...); auto t1 = make_tuple(); auto f1 = map(0, t1)
next prev parent reply other threads:[~2015-09-23 7:53 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-09-22 23:27 [Bug c++/67686] New: " ryan.burn at gmail dot com 2015-09-23 7:53 ` trippels at gcc dot gnu.org [this message] 2015-09-28 7:58 ` [Bug c++/67686] " trippels at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-67686-4-2bwfl3NAWL@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).