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> maybeget_from_json8 optional<AsWhat> maybe() const 9 { 10 return this->operator optional<AsWhat>(); 11 } 12 }; test()13void test() 14 { 15 get_from_json().maybe<int>(); 16 } 17