У меня есть следующий код:
#include <utility>
template<class T,class E = void>
struct func_impl;
template<class T,class E = void>
constexpr inline bool has_func = false;
template<class T>
constexpr inline bool has_func<T,decltype(func_impl<T>::apply(std::declval<T>()))> = true;
template<>
struct func_impl<int>
{
static int apply(int i);
};
static_assert(has_func<int>);
Сбой static_assert, где я ожидал, что это удастся.Что я сделал не так?