I was reading about user-defined literals, and I came across this snippet, but I got compiler error when I tried to use it.
int operator ""_fix(long double d)
{
// returns d as a 1.15.16 fixed point number
return (int)(d*65536.0f);
}
It says Error : Expected an operator. I am on Visual STudio 2013, which I believe has good support for C++ 11. Any ideas what is going wrong?