public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Paolo Carlini <paolo.carlini@oracle.com>
To: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: [C++ testcase, committed] PR 56611
Date: Wed, 13 Mar 2013 11:46:00 -0000	[thread overview]
Message-ID: <51406714.9010106@oracle.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 128 bytes --]

Hi,

I'm committing the testcase and closing the issue as already fixed in 
mainline.

Thanks,
Paolo.

////////////////////////

[-- Attachment #2: CL_56611 --]
[-- Type: text/plain, Size: 107 bytes --]

2013-03-13  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/56611
	* g++.dg/cpp0x/alias-decl-32.C: New.

[-- Attachment #3: patch_56611 --]
[-- Type: text/plain, Size: 926 bytes --]

Index: g++.dg/cpp0x/alias-decl-32.C
===================================================================
--- g++.dg/cpp0x/alias-decl-32.C	(revision 0)
+++ g++.dg/cpp0x/alias-decl-32.C	(working copy)
@@ -0,0 +1,25 @@
+// PR c++/56611
+// { dg-do compile { target c++11 } }
+
+template<class T> struct remove_reference     { typedef T type; };
+template<class T> struct remove_reference<T&> { typedef T type; };
+template<class T> T declval() { return T(); }
+
+int f(int, int){return 0;}
+struct Func{};
+
+template<class... Args> struct result1
+{
+  typedef decltype(f(declval<typename remove_reference<Args>::type>()...)) type;
+};
+
+template<class... Args> using result2
+= decltype(f(declval<typename remove_reference<Args>::type>()...));
+
+template<class Sig> struct R;
+template<class This, class... Args> struct R< This(Args...) > 
+{
+  typedef result2<Args...> type;
+};
+
+typedef R< Func(int, int) >::type R_type;

                 reply	other threads:[~2013-03-13 11:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=51406714.9010106@oracle.com \
    --to=paolo.carlini@oracle.com \
    --cc=gcc-patches@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: link
Be 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).