Recently I have installed Visual Studio 2012. After the installation I updated my IDE with update 3 to guarantee functionality of my programs on Windows XP.
Everything is working well, but I still can not use initializer list and variadic templates! Do I need any extra updates to get this working with Visual Studio 2012?
VS2012 does not support variadic templates and initializer lists, even with the latest updates. VS2013 RC, however, supports both.
For a full overview of what C++11 features are supported, see:
http://msdn.microsoft.com/en-us/library/vstudio/hh567368(v=vs.120).aspx
Or if you really like VS2012 you can try the 2012 Nov CTP - http://blogs.msdn.com/b/vcblog/archive/2012/11/02/visual-c-c-11-and-the-future-of-c.aspx
Note: This CTP (Consumer Technology Preview) has only compiler update, so you can use variadic templates & initializer_lists in your code, but will not find them in the standard library.
Related
I want to work with C++ 11 (if not C++ 14). I am installing visual studio 2015 enterprise edition. Is this sufficient?
Basically, yes. Most of C++11 has been implemented in VS2015. Most of C++14 has been implemented in VS2017.
Completely? No.
There are still various missing features (expression SFINAE) and bugs in the Microsoft compiler implementations of C++. If and when you run into these limitations depends on the style of code you write.
You can check that on MSDN or cppreference
A screenshot from MSDN:
I use MS Visual Studio 2012 for Windows Desktop (C++) and I've recently started using C++11 features,such as range-based for loop,lambda functions,final,override and so on.
But I cannot use some of the features,like std::initializer_list,user-defined signatures...
I don't understand why this version of MS Visual Studio does support some,but not all of them.
Should I start using a newer version,or what?
Thanks.
Yes, you should start using a newer version, because as it happens, newer versions implement new features.
Also, your question doesn't really ask a question.
You can find comparison tables of supported C++11 features in recent versions of Visual Studio on the MSDN website: http://msdn.microsoft.com/en-us/library/hh567368.aspx
Visual Studio 2008 offered a feature pack with which one could create code-frameworks for office-style applications:
http://www.microsoft.com/en-us/download/details.aspx?id=6922
Am I allowed to use this with my Visual Studio 2013 license? Or can I find a feature pack (or code-snippet) for Visual Studio 2013 which offers that functionality (Visual C++, MFC)?
The features of the Feature Pack were rolled into VS proper with VS 2008 SP1. They've been shipped as part of the base VS distribution ever since (at least in the versions that include MFC at all). You can now use all the ribbon bars, dockable windows, etc., without adding anything to VS as it comes out of the box.
Looking through the new features of C++11, delegating constructors seems like they would be particular useful in my situation.
Unfortunately, I need to use Visual Studio. The project I am working on has a several month deadline and using experimental/broken compilers doesn't concern me. Is there a version of Visual C++ that can will let me do constructor delegation?
See http://www.stroustrup.com/C++11FAQ.html#inheriting
Yes, there is a beta version of the compiler that supports delegating constructors - the Visual C++ Compiler November 2012 CTP.
In the meanwhile, try
#define INHERIT_CONSTRUCTOR(BaseName,DerivedName) template <class... Args> DerivedName(Args&&... args) : BaseName(std::forward<Args>(args)...) { }
Once you've successfully installed the CTP via the link given above by Karel Petranek, just create any old C++ project.
Then, under the project's 'Property Pages > Configuration Properties > General > Platform Toolset', choose "Microsoft Visual C++ Compiler Nov 2012 CTP (v120_CTP_Nov2012)".
That's all. Now you have access to these additional C++ compiler features in VS2012.
You don't have to install CTP anymore.
Visual Studio 2013 will support delegating constructors and you can try the Preview version which is available by now.
A preview version of Visual Studio 2012 (the next version after VS2010) is now available.
Does anyone know what new C++11 features it supports? (I'm not in a position to try it out at the moment).
It's worth noting that Visual Studio 2010 already had quite a bit of early C++11 support. So to summarize what is already linked to in other answers, here is what is new in Visual Studio 11 that was not part of Visual Studio 2010:
rvalue references to version 2.1 from 2.0
lambdas to version 1.1 from 1.0.
decltype to version 1.1 from 1.0(not yet available in developer preview)
Improved, but still incomplete, Alignment
completed strongly-typed enums
forward declared enums
Standard layout and trivial types
Atomics
Strong compare and exchange
Bi-directional fences
Data-dependency ordering
Range-based for loop
In early November 2012, Microsoft announced the Visual C++ Compiler November 2012 CTP, which adds more C++11 functionality to Visual Studio 2012:
uniform initialization
initializer lists
variadic templates
function template default arguments
delegating constructors
explicit conversion operators
raw strings