Debian Codegraph @

gcc/testsuite/g++.dg/template/pr83988.C

raw
1 // PR 83988 ICE
2
3 template<class T> struct optional {};
4 struct get_from_json {
5 template<typename GetWhat>
6 operator optional<GetWhat>() const {return optional<GetWhat> ();}
7 template<typename AsWhat>
8 optional<AsWhat> maybe() const
9 {
10 return this->operator optional<AsWhat>();
11 }
12 };
13 void test()
14 {
15 get_from_json().maybe<int>();
16 }