c++: fix explicit/copy problem [PR109247]
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / initlist-explicit3.C
blobb0c92784566d797d54717a22bdb6c53cc74499ca
1 // PR c++/109247
2 // { dg-do compile { target c++11 } }
4 template <typename _Tp> struct optional {
5   template <typename _Up> explicit optional(_Up);
6   template <typename _Up = _Tp> void operator=(_Up);
7 };
8 int setPattern_pattern;
9 struct SourceBrush {
10   struct Brush {
11     int brush;
12   };
13   void setPattern() { m_brush = {setPattern_pattern}; }
14   optional<Brush> m_brush;