Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C++ 11 User Defined Literals with Microsoft Visual Studio 2013

As far as I know UDL are included and supported in MVS 2013.

I have tried to do things such as:

    myclass operator"" _suffix();
    int     operator"" _suffix();

Both the above lines give errors at "" saying it expected an operator. My guess is that something is wrong with the project settings since the code should work and UDL is supported by MVS13.

What could be the problem and how can I solve it ?

like image 563
taigi tanaka Avatar asked Apr 21 '14 23:04

taigi tanaka


1 Answers

User defined literals are not supported by MSVC 2013 or lower. They are however supported in MSVC "14" CTP and will be part of the eventual MCVC 2015 release.

Sources: C++11 Features in MSVC and VS 14 CTP

like image 194
Rado Avatar answered Oct 18 '22 03:10

Rado