gcc/testsuite/g++.dg/cpp0x/initlist-explicit3.C
raw| 1 | // PR c++/109247 |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | |
| 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; |
| 15 | }; |