OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [initlist2.C] - Blame information for rev 774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// Test that conversion to std::initializer_list takes priority over other
2
// user-defined conversions.
3
 
4
// { dg-do link }
5
// { dg-options "-std=c++0x" }
6
 
7
#include 
8
 
9
struct string
10
{
11
  string (const char *) {}
12
  template  string (Iter, Iter);
13
};
14
 
15
template 
16
struct pair
17
{
18
  pair (T t, U u) {}
19
};
20
 
21
template
22
struct map
23
{
24
  void insert (pair);
25
  void insert (std::initializer_list >) {}
26
};
27
 
28
int main()
29
{
30
  map m;
31
  m.insert({ {"this","that"}, {"me","you"} });
32
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.