gcc/testsuite/g++.dg/template/pr84434.C
raw| 1 | // PR c++/84434 ICE with deduction guide and dependent using decl |
| 2 | // { dg-do compile { target c++17 } } |
| 3 | |
| 4 | template <typename T> class B { |
| 5 | public: |
| 6 | template <typename U> B (U) {} |
| 7 | }; |
| 8 | |
| 9 | template <typename T> |
| 10 | struct scope_guard : B<T> { |
| 11 | using base_type = B<T>; |
| 12 | |
| 13 | using base_type::base_type; |
| 14 | |
| 15 | ~scope_guard() = default; |
| 16 | }; |
| 17 | |
| 18 | template <typename T> |
| 19 | scope_guard (T) -> scope_guard<T>; |
| 20 | |
| 21 | void Frob () { |
| 22 | scope_guard (1); |
| 23 | } |