PR c++/86728 - C variadic generic lambda.
[official-gcc.git] / gcc / testsuite / g++.dg / template / pr83988.C
blobbd2762cd68f806fc822b5bb0fb617aba71ebeb12
1 // PR 83988 ICE
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   }
13 void test()
15   get_from_json().maybe<int>();