https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89024

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
(In reply to Marek Polacek from comment #1)
> A valid version:

Eh, this one (without the semicolon):

template<class T> T&& declval();

template<typename _To1>
void __test_aux(_To1);

template<typename _From1, typename _To1,
        typename = decltype(__test_aux<_To1>(declval<_From1>()))>
char __test(int);

template<typename, typename>
int __test(...);

enum E {
    x = decltype(__test<E, int>(0))(0)
};

Reply via email to