Patchwork [C++,testcase] PR 50478

login
register
mail settings
Submitter Paolo Carlini
Date Oct. 10, 2012, 9:15 a.m.
Message ID <50753CC9.4030509@oracle.com>
Download mbox | patch
Permalink /patch/190585/
State New
Headers show

Comments

Paolo Carlini - Oct. 10, 2012, 9:15 a.m.
Hi,

adding the testcase and closing the PR as fixed.

Thanks,
Paolo.

//////////////////////////////
2012-10-10  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/50478
	* g++.dg/cpp0x/initlist67.C: New.

Patch

Index: g++.dg/cpp0x/initlist67.C
===================================================================
--- g++.dg/cpp0x/initlist67.C	(revision 0)
+++ g++.dg/cpp0x/initlist67.C	(working copy)
@@ -0,0 +1,27 @@ 
+// PR c++/50478
+// { dg-do compile { target c++11 } }
+
+#include <initializer_list>
+
+namespace std
+{
+  template<typename _Key>
+    struct set
+    {
+      void insert(const _Key&);
+      void insert(initializer_list<_Key>);
+    };
+
+  struct string
+  {
+    string(const string&, __SIZE_TYPE__, __SIZE_TYPE__ = -1);
+    string(const char*);
+    string(initializer_list<char>);
+  };
+}
+
+int main()
+{
+  std::set<std::string> s;
+  s.insert( { "abc", "def", "hij"} );
+}