Serving the Quantitative Finance Community

 
User avatar
tags
Topic Author
Posts: 3603
Joined: February 21st, 2010, 12:58 pm

Visual C++ Compiler Nov 2012 CTP (v120_CTP_Nov2012)

February 26th, 2013, 6:00 pm

Hi everyone,I am using Visual Studio 2012 and I just installed the v120_CTP_Nov2012 compiler.Considering the example code given below.I get red underline squiggles and IntelliSense warns "badly-formed pure specifier (only '= 0' is allowed) .. blabla ... (Microsoft Visual C++ Compiler Nov 2012 CTP).According to what I read at stackoverflow.com, the warning message is 'normal' (this is a CTP compiler version) and this should compile okay.Can anyone confirm this before I go any further with my code?Or maybe is there a trick to disable those actually not alarming warnings?
 
User avatar
Hansi
Posts: 41
Joined: January 25th, 2010, 11:47 am

Visual C++ Compiler Nov 2012 CTP (v120_CTP_Nov2012)

February 26th, 2013, 6:04 pm

Did you update the Platform toolset in the project properties? https://blogs.msdn.com/b/vcblog/archive ... ected=true
 
User avatar
tags
Topic Author
Posts: 3603
Joined: February 21st, 2010, 12:58 pm

Visual C++ Compiler Nov 2012 CTP (v120_CTP_Nov2012)

February 26th, 2013, 6:54 pm

Thank you for replying, Hansi.Yes, I updated the platform toolset.I even restarted my computer after I installed v120_CTP_Nov2012 and I created a all new project.But, I still have this warning.
Last edited by tags on February 25th, 2013, 11:00 pm, edited 1 time in total.
 
User avatar
Cuchulainn
Posts: 22936
Joined: July 16th, 2004, 7:38 am

Visual C++ Compiler Nov 2012 CTP (v120_CTP_Nov2012)

February 26th, 2013, 6:57 pm

What MyLovelyClass() = default;??
 
User avatar
tags
Topic Author
Posts: 3603
Joined: February 21st, 2010, 12:58 pm

Visual C++ Compiler Nov 2012 CTP (v120_CTP_Nov2012)

February 26th, 2013, 7:33 pm

I am trying out ideas from Professional C++, By Marc Gregoire, Nicholas A. Solter, Scott J. Kleper (books.google)The authors explain that C++11 supports the concept of explicitly defaulted constructors. It avoids to write empty default constructors manually. And, they add there is no need of class implemenration in the implementation file.The example code below is given (as can been freely read at books.google).(maybe I got it all wrong )
 
User avatar
Cuchulainn
Posts: 22936
Joined: July 16th, 2004, 7:38 am

Visual C++ Compiler Nov 2012 CTP (v120_CTP_Nov2012)

February 26th, 2013, 7:44 pm

Nice to have feature aka GOLD PLATING??http://social.msdn.microsoft.com/Forums ... 37234566ad
 
User avatar
tags
Topic Author
Posts: 3603
Joined: February 21st, 2010, 12:58 pm

Visual C++ Compiler Nov 2012 CTP (v120_CTP_Nov2012)

February 26th, 2013, 8:11 pm

QuoteOriginally posted by: edouardI am trying out ideas from Professional C++, By Marc Gregoire, Nicholas A. Solter, Scott J. Kleper (books.google)The authors explain that C++11 supports the concept of explicitly defaulted constructors. It avoids to write empty default constructors manually. And, they add there is no need of class implemenration in the implementation file.The example code below is given (as can been freely read at books.google).(maybe I got it all wrong )Alternatively, one can read the explanation here, paragraph "C++11 Explicitly Defaulted Constructors"
 
User avatar
dd3
Posts: 4
Joined: June 8th, 2010, 9:02 am

Visual C++ Compiler Nov 2012 CTP (v120_CTP_Nov2012)

February 27th, 2013, 12:21 am

If it compiles it compiles. I got intellisense errors before about variable scope issues when nesting lambdas. The program compiled and ran fine.
Last edited by dd3 on February 26th, 2013, 11:00 pm, edited 1 time in total.
 
User avatar
CluelessCpp
Posts: 0
Joined: April 7th, 2012, 11:45 am

Visual C++ Compiler Nov 2012 CTP (v120_CTP_Nov2012)

February 27th, 2013, 12:52 pm

IntelliSense uses a different C++ parser (EDG) than the Visual C++ compiler. And the CTP only updated the command line compiler, but not IntelliSense - so a different set of C++11 features is supported in IntelliSense compared to the command line compiler.
 
User avatar
tags
Topic Author
Posts: 3603
Joined: February 21st, 2010, 12:58 pm

Visual C++ Compiler Nov 2012 CTP (v120_CTP_Nov2012)

February 27th, 2013, 8:02 pm

Hi all. Thank you for your inputs.That still doesn't compile here.Visual Studio is unhappy with the explicitly defaulted constructor syntax (see the example I gave above) as well as with the explicitly defaulted assignment operator (something like: MyClass& operator = (const MyClass& rhs) = default; ).I am not to bang my head against the wall any longer. I am to use the good old recipes. Gold plating stuff is just not for me
Last edited by tags on February 26th, 2013, 11:00 pm, edited 1 time in total.