blob: bd2762cd68f806fc822b5bb0fb617aba71ebeb12 [file] [log] [blame]
// PR 83988 ICE
template<class T> struct optional {};
struct get_from_json {
template<typename GetWhat>
operator optional<GetWhat>() const {return optional<GetWhat> ();}
template<typename AsWhat>
optional<AsWhat> maybe() const
{
return this->operator optional<AsWhat>();
}
};
void test()
{
get_from_json().maybe<int>();
}