public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "niels at penneman dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/55311] Cannot specialize template parameter of type 'const char *const' in 'using' alias Date: Wed, 05 Dec 2012 08:33:00 -0000 [thread overview] Message-ID: <bug-55311-4-Svty3NYMYu@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-55311-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55311 --- Comment #2 from Niels Penneman <niels at penneman dot org> 2012-12-05 08:32:42 UTC --- Workaround for GCC 4.8.0-alpha20121202 (full version details see earlier post) for case #2: replace STRING_PTR template parameter with static_cast<const char *const>(STRING_PTR). Example code below with same invocation arguments is accepted by the compiler. =================================================== extern constexpr char STRING_PTR[] = "test"; template <const char *const C, typename T> struct A {}; template <typename T> struct B: A<static_cast<const char *const>(STRING_PTR), T> {}; =================================================== This workaround does not work for case #1 (with 'using') and does not seem to work on 4.7.2 in general.
next prev parent reply other threads:[~2012-12-05 8:33 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-11-13 14:16 [Bug c++/55311] New: " niels at penneman dot org 2012-12-04 21:01 ` [Bug c++/55311] " niels at penneman dot org 2012-12-05 8:33 ` niels at penneman dot org [this message] 2012-12-22 16:09 ` dodji at seketeli dot org 2012-12-22 16:11 ` dodji at gcc dot gnu.org 2013-01-07 8:07 ` dodji at gcc dot gnu.org 2013-01-07 11:00 ` dodji 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-55311-4-Svty3NYMYu@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).