template<class T>
std::vector<T> convert(int argument)
{
}
int main()
{
decltype(&convert<int>);
return 0;
}
The following gives this error for Visual Studio 2010:
error C3555: incorrect argument to 'decltype'
Why?
I'm tring to create a std::map where the key is an enum and the value is a function.
VS2010 bug. That link also has a workaround:
template <typename T> T identity(T);
decltype(identity(&convert<int>));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With