public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "paolo.carlini at oracle dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/53039] [4.7/4.8 Regression] including <functional> breaks std::is_convertible with template-pack expansion Date: Fri, 20 Apr 2012 12:38:00 -0000 [thread overview] Message-ID: <bug-53039-4-YybvRhC7OQ@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-53039-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53039 --- Comment #10 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-04-20 12:37:33 UTC --- So, the below is my final pure C++ testcase: if 1 is changed to 0 the code compiles; likewise if 1 and 0 are swapped. Thus, it seems there is something wrong in global front-end data structures: template <class, class> struct is_convertible { static const bool value = true; }; template<bool, class T> struct enable_if { typedef T type; }; template <bool...> struct Xs { static const bool value = true; }; #if 1 template<typename... Ts> class BType { template <typename... Us, typename enable_if< Xs<is_convertible<Us, Ts>::value...>::value, bool>::type = false> void fooX(Us&&...); }; #endif template <typename... Ts> struct AType { template <typename... Us, typename enable_if< Xs<is_convertible<Us, Ts>::value...>::value, bool>::type = false> void foo(Us&&...); }; #if 0 template<typename... Ts> class CType { template <typename... Us, typename enable_if< Xs<is_convertible<Us, Ts>::value...>::value, bool>::type = false> void fooX(Us&&...); }; #endif int main() { AType<int, int> t; t.foo(1, 1); }
next prev parent reply other threads:[~2012-04-20 12:38 UTC|newest] Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-04-19 7:57 [Bug c++/53039] New: [C++11]including " mitchnull+gcc at gmail dot com 2012-04-19 8:00 ` [Bug c++/53039] " mitchnull+gcc at gmail dot com 2012-04-19 8:00 ` mitchnull+gcc at gmail dot com 2012-04-19 8:43 ` redi at gcc dot gnu.org 2012-04-19 10:48 ` [Bug c++/53039] [4.7/4.8 Regression] including " paolo.carlini at oracle dot com 2012-04-19 14:51 ` hjl.tools at gmail dot com 2012-04-19 16:01 ` paolo.carlini at oracle dot com 2012-04-20 6:49 ` daniel.kruegler at googlemail dot com 2012-04-20 9:07 ` paolo.carlini at oracle dot com 2012-04-20 10:27 ` paolo.carlini at oracle dot com 2012-04-20 12:38 ` paolo.carlini at oracle dot com [this message] 2012-04-26 14:02 ` rguenth at gcc dot gnu.org 2012-04-26 14:23 ` rguenth at gcc dot gnu.org 2012-05-02 11:46 ` jakub at gcc dot gnu.org 2012-06-11 5:59 ` jason at gcc dot gnu.org 2012-06-14 8:47 ` rguenth at gcc dot gnu.org 2012-06-14 10:03 ` paolo.carlini at oracle dot com 2012-07-05 17:16 ` jason at gcc dot gnu.org 2012-07-05 19:39 ` jason at gcc dot gnu.org 2012-07-05 21:25 ` jason at gcc dot gnu.org 2012-07-06 1:34 ` [Bug c++/53039] [4.7 " jason at gcc dot gnu.org 2012-09-13 10:31 ` paolo.carlini at oracle dot com 2012-09-20 10:28 ` jakub at gcc dot gnu.org 2012-11-29 20:18 ` jason at gcc dot gnu.org 2012-11-29 20:57 ` jason 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-53039-4-YybvRhC7OQ@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).