clang/test/CXX/temp/temp.deduct.guide/p2.cpp
raw| 1 | // RUN: %clang_cc1 -std=c++1z -verify %s |
| 2 | // expected-no-diagnostics |
| 3 | |
| 4 | namespace std_example { |
| 5 | template<typename T, typename U = int> struct S { |
| 6 | T data; |
| 7 | }; |
| 8 | template<typename U> S(U) -> S<typename U::type>; |
| 9 | |
| 10 | struct A { |
| 11 | using type = short; |
| 12 | operator type(); |
| 13 | }; |
| 14 | S x{A()}; |
| 15 | } |