(root)/
gcc-13.2.0/
gcc/
testsuite/
g++.dg/
template/
pr83988.C
// 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>();
}