public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [C++ testcase, committed] PR 56611
@ 2013-03-13 11:46 Paolo Carlini
  0 siblings, 0 replies; only message in thread
From: Paolo Carlini @ 2013-03-13 11:46 UTC (permalink / raw)
  To: gcc-patches

[-- 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;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-03-13 11:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-13 11:46 [C++ testcase, committed] PR 56611 Paolo Carlini

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).