Visual C++ What's New 2003 through 2015 (original) (raw)

This page gathers all the "What's New" pages for all versions of Visual C++ from Visual Studio 2015 back to 2003. This information is provided as a convenience in case it might be useful when upgrading from earlier versions of Visual Studio.

What's New for C++ in Visual Studio 2015

In Visual Studio 2015 and later, ongoing improvements to compiler conformance can sometimes change how the compiler understands your existing source code. When this happens, you might encounter new or different errors during your build, or even behavioral differences in code that previously built and seemed to run correctly.

Fortunately, these differences have little or no impact on most of your source code and when source code or other changes are needed to address these differences, fixes are usually small and straight-forward. We've included many examples of previously-acceptable source code that might need to be changed (before) and the fixes to correct them (after).

Although these differences can affect your source code or other build artifacts, they don't affect binary compatibility between updates to Visual C++ versions. A more-severe kind of change, the breaking change can affect binary compatibility, but these kinds of binary compatibility breaks only occur between major versions of Visual C++. For example, between Visual C++ 2013 and Visual C++ 2015. For information on the breaking changes that occurred between Visual C++ 2013 and Visual C++ 2015, see Visual C++ change history 2003 - 2015.

Conformance Improvements in Visual Studio 2015

  Command line warning  D9035: option 'Zc:forScope-' has been deprecated and will be removed in a future release  

The option was usually used in order to allow nonstandard code that uses loop variables after the point where, according to the standard, they should have gone out of scope. It was only necessary when you are compiling with the /Za option, since without /Za, using a for loop variable after the end of the loop is always allowed. If you don't care about standards conformance (for example, if your code isn't meant to portable to other compilers), you could turn off the /Za option (or set the Disable Language Extensions property to No). If you do care about writing portable, standards-conformant code, you should rewrite your code so that it conforms to the standard by moving the declaration of such variables to a point outside the loop.

  // zc_forScope.cpp  
  // compile with: /Zc:forScope- /Za  
  // C2065 expected  
  int main() {  
     // Uncomment the following line to resolve.  
     // int i;  
     for (int i =0; i < 1; i++)  
        ;  
     i = 20;   // i has already gone out of scope under /Za  
  }  
  struct S {  
      mutable int &r;  
  };  

Previous versions of the Microsoft C++ compiler accepted this, but now the compiler gives the following error:

  error C2071: 'S::r': illegal storage class  

To fix the error, simply remove the redundant mutable keyword.

  #include <cstdint>  
  typedef uint16_t char16_t; //C2628  
  typedef uint32_t char32_t; //C2628  
  int main(int argc, char* argv[])  
  {  
  uint16_t x = 1; uint32_t y = 2;  
  char16_t a = x;  
  char32_t b = y;  
  return 0;  
  }  

To update your code, remove the typedef declarations and rename any other identifiers that collide with these names.

  struct S1  
  {  
      void f(int);  
      void f(int, int);  
  };  
  struct S2  
  {  
      template <class C, void (C::*Function)(int) const> void f() {}  
  };  
  void f()  
  {  
      S2 s2;  
      s2.f<S1, &S1::f>();  
  }  

The current compiler correctly gives an error, because the template parameter type does not match the template argument (the parameter is a pointer to a const member, but the function f is non-const):

  error C2893: Failed to specialize function template 'void S2::f(void)'note: With the following template arguments:note: 'C=S1'note: 'Function=S1::f'  

To address this error in your code, make sure that the type of the template argument you use matches the declared type of the template parameter.

  error C3323: 'alignas' and '__declspec(align)' are not allowed on function declarations  

To fix this problem, remove __declspec(align) from the function declaration. Since it had no effect, removing it does not change anything.

  struct S {  
  public:  
      S();  
  private:  
      S(const S &);  
  };  
  int main()  
  {  
      throw S(); // error  
  }  

The problem is that the copy constructor is private, so the object cannot be copied as happens in the normal course of handling an exception. The same applies when the copy constructor is declared explicit.

  struct S {  
      S();  
      explicit S(const S &);  
  };  
  int main()  
  {  
      throw S(); // error  
  }  

To update your code, make sure that the copy constructor for your exception object is public and not marked explicit.
Catching an exception by value also requires the exception object to be copyable. The following code compiled in Visual Studio 2013, but does not compile in Visual Studio 2015:

  struct B {  
  public:  
      B();  
  private:  
      B(const B &);  
  };  
  struct D : public B {  
  };  
  int main()  
  {  
      try  
      {  
      }  
      catch (D d) // error  
      {  
      }  
  }  

You can fix this issue by changing the parameter type for the catch to a reference.

  catch(D& d)  
  {  
  }  
  #define _x "there"  
  char* func() {  
      return "hello"_x;  
  }  
  int main()  
  {  
      char * p = func();  
      return 0;  
  }  

The compiler interpreted this as a string literal "hello" followed by a macro, which is expanded "there", and then the two string literals were concatenated into one. In Visual Studio 2015, the compiler interprets this as a user-defined literal, but since there is no matching user-defined literal _x defined, it gives an error.

  error C3688: invalid literal suffix '_x'; literal operator or literal operator template 'operator ""_x' not found  
  note: Did you forget a space between the string literal and the prefix of the following string literal?  

To fix this problem, add a space between the string literal and the macro.

  char * str = "abc""def";  

Simply add a space in between the two strings.

  char * str = "abc" "def";  
  void * operator new(std::size_t, std::size_t);  
  void operator delete(void*, std::size_t) noexcept;  

The problem occurs because of the match in function signatures between a placement delete operator you've defined, and the new global sized delete operator. Consider whether you can use a different type other than size_t for any placement new and delete operators. Note that the type of the size_t typedef is compiler-dependent; it is a typedef for unsigned int in Visual C++. A good solution is to use an enumerated type such as this:

  enum class my_type : size_t {};  

Then, change your definition of placement new and delete to use this type as the second argument instead of size_t. You'll also need to update the calls to placement new to pass the new type (for example, by using static_cast<my_type> to convert from the integer value) and update the definition of new and delete to cast back to the integer type. You don't need to use an enum for this; a class type with a size_t member would also work.
An alternative solution is that you might be able to eliminate the placement new altogether. If your code uses placement new to implement a memory pool where the placement argument is the size of the object being allocated or deleted, then sized deallocation feature might be suitable to replace your own custom memory pool code, and you can get rid of the placement functions and just use your own two-argument delete operator instead of the placement functions.
If you don't want to update your code immediately, you can revert to the old behavior by using the compiler option /Zc:sizedDealloc-. If you use this option, the two-argument delete functions don't exist and won't cause a conflict with your placement delete operator.

  union U1 {  
      const int i;  
  };  
  union U2 {  
     int &i;  
  };  
  union U3 {  
      struct {int &i;};  
  };  

The preceding code produces the following errors:

  test.cpp(67): error C2625: 'U2::i': illegal union member; type 'int &' is reference type  
  test.cpp(70): error C2625: 'U3::i': illegal union member; type 'int &' is reference type  

To address this issue, change reference types either to a pointer or a value. Changing the type to a pointer requires changes in the code that uses the union field. Changing the code to a value would change the data stored in the union, which affects other fields since fields in union types share the same memory. Depending on the size of the value, it might also change the size of the union.

struct S {  
    S();  
};  
union {  
    struct {  
       S s;  
    };  
} u; // C2280  

The preceding code generates the following error in Visual Studio 2015:

  error C2280: '<unnamed-type-u>::<unnamed-type-u>(void)': attempting to reference a deleted function  
  note: compiler has generated '<unnamed-type-u>::<unnamed-type-u>' here  

To resolve this issue, provide your own definitions of the constructor and/or destructor.

  struct S {  
     // Provide a default constructor by adding an empty function body.  
     S() {}  
  };  
  union {  
     struct {  
        S s;  
     };  
  } u;  
  #include <stdio.h>  
  struct S {  
      S() { printf("Creating S\n"); }  
      ~S(){ printf("Destroying S\n"); }  
  };  
  union U {  
      struct {  
      S s;  
  };  
      U() {}  
      ~U(){}  
  };  
  void f()  
  {  
      U u;  
      // Destructor implicitly called here.  
  }  
  int main()  
  {  
      f();  
      char s[1024];  
      printf("Press any key.\n");  
      gets_s(s);  
      return 0;  
  }  

In Visual Studio 2013, the constructor for S is called when the union is created, and the destructor for S is called when the stack for function f is cleaned up. But in Visual Studio 2015, the constructor and destructor are not called. The compiler gives a warning about this behavior change.

  warning C4587: 'U::s': behavior change: constructor is no longer implicitly calledwarning C4588: 'U::s': behavior change: destructor is no longer implicitly called  

To restore the original behavior, give the anonymous structure a name. The runtime behavior of non-anonymous structures is the same, regardless of the compiler version.

  #include <stdio.h>  
  struct S {  
      S() { printf("Creating S.\n"); }  
      ~S() { printf("Destroying S\n"); }  
  };  
  union U {  
      struct {  
          S s;  
      } namedStruct;  
      U() {}  
      ~U() {}  
  };  
  void f()  
  {  
      U u;  
  }  
  int main()  
  {  
      f();  
      char s[1024];  
      printf("Press any key.\n");  
      gets_s(s);  
      return 0;  
  }  

Alternatively, try moving the constructor and destructor code into new functions, and add calls to these functions from the constructor and destructor for the union.

  #include <stdio.h>  
  struct S {  
      void Create() { printf("Creating S.\n"); }  
      void Destroy() { printf("Destroying S\n"); }  
  };  
  union U {  
      struct {  
          S s;  
      };  
      U() { s.Create();  }  
      ~U() { s.Destroy(); }  
  };  
  void f()  
  {  
      U u;  
  }  
  int main()  
  {  
      f();  
  char s[1024];  
  printf("Press any key.\n");  
  gets_s(s);  
  return 0;  
  }  
  #include <type_traits>  
  template<typename T>  
  struct S  
  {  
  S() = default;  
  S(const S&);  
  S(S&&);  
  template<typename U, typename = typename std::enable_if<std::is_base_of<T, U>::value>::type>  
  S(S<U>&&);  
  };  
  struct D;  
  void f1()  
  {  
  S<D> s1;  
      S<D> s2(s1);  
  }  
  struct B  
  {  
  };  
  struct D : public B  
  {  
  };  
  void f2()  
  {  
  S<D> s1;  
      S<D> s2(s1);  
  }  

If you compile with the current compiler, you get the following error:

  type_traits(1110): error C2139: 'D': an undefined class is not allowed as an argument to compiler intrinsic type trait '__is_base_of'  
  ..\t331.cpp(14): note: see declaration of 'D'  
  ..\t331.cpp(10): note: see reference to class template instantiation 'std::is_base_of<T,U>' being compiled  
          with  
          [  
              T=D,  
              U=D  
          ]  

This is because at the point of the first invocation of the is_base_of the class 'D' has not yet been defined.
In this case, the fix is not to use such type traits until the class has been defined. If you move the definitions of B and D to the beginning of the code file, the error is resolved. If the definitions are in header files, check the order of the include statements for the header files to make sure that any class definitions are compiled before the problematic templates are used.

Conformance Improvements in Visual Studio 2015 Update 1

  error C2280: 'void *S3::__delDtor(unsigned int)': attempting to reference a deleted function  

Example (before)

  class base  
  {  
  protected:  
      base();  
      ~base();  
  };  
  class middle: private virtual base {};class top: public virtual middle {};  
  void destroy(top *p)  
  {  
      delete p;  //  
  }  

Example (after)

  class base;  // as above  
  class middle: protected virtual base {};  
  class top: public virtual middle {};  
  void destroy(top *p)  
  {  
      delete p;  
  }  

-or-

  class base;  // as above  
  class middle: private virtual base {};  
  class top: public virtual middle, private virtual bottom {};  
  void destroy(top *p)  
  {  
      delete p;  
  }  
  error C2323: 'operator new': non-member operator new or delete functions may not be declared static or in a namespace other than the global namespace.  

Example (before)

  static inline void * __cdecl operator new(size_t cb, const std::nothrow_t&)  // error C2323  

Example (after)

  void * __cdecl operator new(size_t cb, const std::nothrow_t&)  // removed 'static inline'  

Additionally, although the compiler does not give a specific diagnostic, inline operator new is considered ill-formed.

  error C2228: left of '.operator type' must have class/struct/union  

Example (before)

  typedef int index_t;  
  void bounds_check(index_t index);  
  void login(int column)  
  {  
      bounds_check(column.operator index_t());  // error C2228  
  }  

Example (after)

  typedef int index_t;  
  void bounds_check(index_t index);  
  void login(int column)  
  {  
       bounds_check(column);  // removed cast to 'index_t', 'index_t' is an alias of 'int'  
  }  
  error C3406: 'typename' cannot be used in an elaborated type specifier  

Example (before)

  template <typename class T>  
  class container;  

Example (after)

  template <class T>  // alternatively, could be 'template <typename T>'; 'typename' is not elaborating a type specifier in this case  
  class container;  
  error C2668: 'function' : ambiguous call to overloaded function.  

Example 1: Ambiguous call to overloaded function (before)

  // In previous versions of the compiler, code written in this way would unambiguously call f(int, Args...)  
  template <typename... Args>  
  void f(int, Args...);  //  
  template <int N, typename... Args>  
  void f(const int (&)[N], Args...);  
  int main()  
  {  
      // The compiler now considers this call ambiguous, and issues a compiler error  
      f({3});  error C2668: 'f' ambiguous call to overloaded function  
  }  

Example 1: ambiguous call to overloaded function (after)

  template <typename... Args>  
  void f(int, Args...);  //  
  template <int N, typename... Args>  
  void f(const int (&)[N], Args...);  
  int main()  
  {  
      // To call f(int, Args...) when there is just one expression in the initializer list, remove the braces from it.  
      f(3);  
  }  

When this new behavior causes overload resolution to consider an additional candidate that is a better match than the historic candidate, the call resolves unambiguously to the new candidate, causing a change in program behavior that is probably different than the programmer intended.
Example 2: change in overload resolution (before)

  // In previous versions of the compiler, code written in this way would unambiguously call f(S, Args...)  
  struct S  
  {  
      int i;  
      int j;  
  };  
  template <typename... Args>  
  void f(S, Args...);  
  template <int N, typename... Args>  
  void f(const int *&)[N], Args...);  
  int main()  
  {  
      // The compiler now resolves this call to f(const int (&)[N], Args...) instead  
      f({1, 2});  
  }  

Example 2: change in overload resolution (after)

  struct S;  // as before  
  template <typename... Args>  
  void f(S, Args...);  
  template <int N, typename... Args>  
  void f(const int *&)[N], Args...);  
  int main()  
  {  
      // To call f(S, Args...), perform an explicit cast to S on the initializer list.  
      f(S{1, 2});  
  }  
  warning C4060: switch statement contains no 'case' or 'default' labels  
  warning C4061: enumerator 'bit1' in switch of enum 'flags' is not explicitly handled by a case label  
  warning C4062: enumerator 'bit1' in switch of enum 'flags' is not handled  
  warning C4063: case 'bit32' is not a valid value for switch of enum 'flags'  
  warning C4064: switch of incomplete enum 'flags'  
  warning C4065: switch statement contains 'default' but no 'case' labels  
  warning C4808: case 'value' is not a valid value for switch condition of type 'bool'  
  Warning C4809: switch statement has redundant 'default' label; all possible 'case' labels are given  

Example of C4063 (before)

  class settings  
  {  
  public:  
      enum flags  
      {  
          bit0 = 0x1,  
          bit1 = 0x2,  
          ...  
      };  
      ...  
  };  
  int main()  
  {  
      auto val = settings::bit1;  
      switch (val)  
      {  
      case settings::bit0:  
          break;  
      case settings::bit1:  
          break;  
      case settings::bit0 | settings::bit1:  // warning C4063  
          break;  
      }  
  };  

Example of C4063 (after)

  class settings {...};  // as above  
  int main()  
  {  
      // since C++11, use std::underlying_type to determine the underlying type of an enum  
      typedef std::underlying_type<settings::flags>::type flags_t;  
      auto val = settings::bit1;  
      switch (static_cast<flags_t>(val))  
      {  
      case settings::bit0:  
          break;  
      case settings::bit1:  
          break;  
      case settings::bit0 | settings::bit1:  // ok  
          break;  
      }  
  };  

Examples of the other restored warnings are provided in their documentation.

  warning C4464: relative include path contains '..'  

Example (before)

  #include "..\headers\C4426.h"  // emits warning C4464  

Example (after)

  #include "C4426.h"  // add absolute path to 'headers\' to your project's include directories  

Additionally, although the compiler does not give a specific diagnostic, we also recommend that the parent-directory specifier ".." should note be used to specify your project's include directories.

  warning C4426: optimization flags changed after including header, may be due to #pragma optimize()  

Example (before)

  // C4426.h  
  #pragma optimize("g", off)  
  ...  
  // C4426.h ends  
  // C4426.cpp  
  #include "C4426.h"  // warning C4426  

Example (after)

  // C4426.h  
  #pragma optimize("g", off)  
  ...  
  #pragma optimize("", on)  // restores optimization flags set via command-line arguments  
  // C4426.h ends  
  // C4426.cpp  
  #include "C4426.h"  
  warning C5031: #pragma warning(pop): likely mismatch, popping warning state pushed in different file  

Example (before)

  // C5031_part1.h  
  #pragma warning(push)  
  #pragma warning(disable:####)  
  ...  
  // C5031_part1.h ends without #pragma warning(pop)  
  // C5031_part2.h  
  ...  
  #pragma warning(pop)  // pops a warning state not pushed in this source file  
  ...  
  // C5031_part1.h ends  
  // C5031.cpp  
  #include "C5031_part1.h" // leaves #pragma warning(push) 'dangling'  
  ...  
  #include "C5031_part2.h" // matches 'dangling' #pragma warning(push), resulting in warning C5031  
  ...  

Example (after)

  // C5031_part1.h  
  #pragma warning(push)  
  #pragma warning(disable:####)  
  ...  
  #pragma warning(pop)  // pops the warning state pushed in this source file  
  // C5031_part1.h ends without #pragma warning(pop)  
  // C5031_part2.h  
  #pragma warning(push)  // pushes the warning state pushed in this source file  
  #pragma warning(disable:####)  
  ...  
  #pragma warning(pop)  
  // C5031_part1.h ends  
  // C5031.cpp  
  #include "C5031_part1.h" // #pragma warning state changes are self-contained and independent of other source files or their #include order.  
  ...  
  #include "C5031_part2.h"  
  ...  

Though uncommon, code written in this way is sometimes intentional. Code written in this way is sensitive to changes in #include order; when possible, we recommend that source code files manage warning state in a self-contained way.

  warning C5032: detected #pragma warning(push) with no corresponding #pragma warning(pop)  

Example (before)

  // C5032.h  
  #pragma warning(push)  
  #pragma warning(disable:####)  
  ...  
  // C5032.h ends without #pragma warning(pop)  
  // C5032.cpp  
  #include "C5032.h"  
  ...  
  // C5032.cpp ends -- the translation unit is completed without #pragma warning(pop), resulting in warning C5032 on line 1 of C5032.h  

Example (after)

  // C5032.h  
  #pragma warning(push)  
  #pragma warning(disable:####)  
  ...  
  #pragma warning(pop) // matches #pragma warning (push) on line 1  
  // C5032.h ends  
  // C5032.cpp  
  #include "C5032.h"  
  ...  
  // C5032.cpp ends -- the translation unit is completed without unmatched #pragma warning(push)  
  warning C4720: unreachable code  

In many cases, this warning might only be issued when compiling with optimizations enabled, since optimizations may inline more function calls, eliminate redundant code, or otherwise make it possible to determine that certain code is unreachable. We have observed that new instances of warning C4720 have frequently occurred in try/catch blocks, especially in relation to use of std::find.
Example (before)

  try  
  {  
      auto iter = std::find(v.begin(), v.end(), 5);  
  }  
  catch(...)  
  {  
      do_something();  // ok  
  }  

Example (after)

  try  
  {  
      auto iter = std::find(v.begin(), v.end(), 5);  
  }  
  catch(...)  
  {  
      do_something();  // warning C4702: unreachable code  
  }  
template <class T>  
inline T pow_int(T x, int y) throw() {  
     unsigned int n;  
     if (y >= 0) {  
         n = (unsigned int)(y);  
     } else {  
         n = (unsigned int)(-y);  
     }  
     for (T z = T(1); ; x *= x) {  
         if ((n & 1) != 0) {  
             z *= x;  
         }  
         if ((n >>= 1) == 0) {  
             return (y < 0 ? T(1) / z : z);  
         }  
     }  
}  

This implementation is identical to what was included in previous versions of Visual Studio.

Conformance Improvements in Visual Studio 2015 Update 2

  error C2039: 'type': is not a member of 'global namespace'  

Example 1: use of an undeclared type (before)

  struct s1  
  {  
    template <typename T>  
    auto f() -> decltype(s2<T>::type::f());  // error C2039  
    template<typename>  
    struct s2 {};  
  }  

Example 1 (after)

  struct s1  
  {  
    template <typename>  // forward declare s2struct s2;  
    template <typename T>  
    auto f() -> decltype(s2<T>::type::f());  
    template<typename>  
    struct s2 {};  
  }  

When this new behavior parses a decltype expression that is missing a necessary use of the typename keyword to specify that a dependent name is a type, the compiler issues compiler warning C4346 together with compiler error C2923.

  warning C4346: 'S2<T>::Type': dependent name is not a type  
  error C2923: 's1': 'S2<T>::Type' is not a valid template type argument for parameter 'T'  

Example 2: dependent name is not a type (before)

  template <typename T>  
  struct s1  
  {  
    typedef T type;  
  };  
  template <typename T>  
  struct s2  
  {  
    typedef T type;  
  };  
  template <typename T>  
  T declval();  
  struct s  
  {  
    template <typename T>  
    auto f(T t) -> decltype(t(declval<S1<S2<T>::type>::type>()));  // warning C4346, error C2923  
  };  

Example 2 (after)

  template <typename T> struct s1 {...};  // as above  
  template <typename T> struct s2 {...};  // as above  
  template <typename T>  
  T declval();  
  struct s  
  {  
    template <typename T>  
    auto f(T t) -> decltype(t(declval<S1<typename S2<T>::type>::type>()));  
  };  
  error C2280: 'B::B(const B &)': attempting to reference a deleted function  

Example (before)

  struct A  
  {  
    volatile int i;  
    volatile int j;  
  };  
  extern A* pa;  
  struct B  
  {  
    union  
    {  
      A a;  
      int i;  
    };  
  };  
  B b1 {*pa};  
  B b2 (b1);  // error C2280  

Example (after)

  struct A  
  {  
    int i;int j;  
  };  
  extern volatile A* pa;  
  A getA()  // returns an A instance copied from contents of pa  
  {  
    A a;  
    a.i = pa->i;  
    a.j = pa->j;  
    return a;  
  }  
  struct B;  // as above  
  B b1 {GetA()};  
  B b2 (b1);  // error C2280  
  error C2511: 'void A::func(void) const': overloaded member function not found in 'A'  

Example (before)

  struct A  
  {  
    static void func();  
  };  
  void A::func() const {}  // C2511  

Example (after)

  struct A  
  {  
    static void func();  
  };  
  void A::func() {}  // removed const  
  error C2599: 'CustomEnum': the forward declaration of a WinRT enum is not allowed  
  error C3197: 'public': can only be used in definitions  

Example (before)

  namespace A {  
    public enum class CustomEnum: int32;  // forward declaration; error C2599, error C3197  
  }  
  namespace A {  
    public enum class CustomEnum: int32  
    {  
      Value1  
    };  
  }  
  public ref class Component sealed  
  {  
  public:  
    CustomEnum f()  
    {  
      return CustomEnum::Value1;  
    }  
  };  

Example (after)

            // forward declaration of CustomEnum removed  
  namespace A {  
    public enum class CustomEnum: int32  
    {  
      Value1  
    };  
  }  
  public ref class Component sealed  
  {  
  public:  
    CustomEnum f()  
    {  
      return CustomEnum::Value1;  
    }  
  };  
  warning C4595: 'operator new': non-member operator new or delete functions may not be declared inline  

Example (before)

  inline void* operator new(size_t sz)  // warning C4595  
  {  
    ...  
  }  

Example (after)

  void* operator new(size_t sz)  // removed inline  
  {  
    ...  
  }  

Fixing code that's written in this way might require that the operator definitions be moved out of a header file and into a corresponding source file.

Conformance Improvements in Visual Studio 2015 Update 3

  #include <type_traits>  
  class X1  
  {  
  public:  
      X1(const X1&) = delete;  
  };  
  class X2  
  {  
  private:  
      X2(const X2&);  
  };  
  static_assert(std::is_convertible<X1&, X1>::value, "BOOM");static_assert(std::is_convertible<X2&, X2>::value, "BOOM");  

In previous versions of Visual C++, the static assertions at the bottom of this example pass because std::is_convertable<>::value was incorrectly set to true. Now, std::is_convertable<>::value is correctly set to false, causing the static assertions to fail.

  error C2248: 'S::S' cannot access private member declared in class 'S'  

Example (before)

  class S {  
  public:  
     S() = default;  
  private:  
      S(const S&) = default;  
  };  
  void f(S);  // pass S by value  
  int main()  
  {  
      S s;  
      f(s);  // error C2248, can't invoke private copy constructor  
  }  

Example (after)

  class S {  
  public:  
     S() = default;  
  private:  
      S(const S&) = default;  
  };  
  void f(const S&);  // pass S by reference  
  int main()  
  {  
      S s;  
      f(s);  
  }  
  warning C4467: Usage of ATL attributes is deprecated  

If you want to continue using attributed ATL code until support is removed from the compiler, you can disable this warning by passing the /Wv:18 or /wd4467 command line arguments to the compiler, or by adding #pragma warning(disable:4467) in your source code.
Example 1 (before)

            [uuid("594382D9-44B0-461A-8DE3-E06A3E73C5EB")]  
  class A {};  

Example 1 (after)

  __declspec(uuid("594382D9-44B0-461A-8DE3-E06A3E73C5EB")) A {};  

Sometimes you might need or want to create an IDL file to avoid the use deprecated ATL attributes, as in the example code below
Example 2 (before)

  [emitidl];  
  [module(name="Foo")];  
  [object, local, uuid("9e66a290-4365-11d2-a997-00c04fa37ddb")]  
  __interface ICustom {  
      HRESULT Custom([in] long l, [out, retval] long *pLong);  
      [local] HRESULT CustomLocal([in] long l, [out, retval] long *pLong);  
  };  
  [coclass, appobject, uuid("9e66a294-4365-11d2-a997-00c04fa37ddb")]  
  class CFoo : public ICustom  
  {  
      // ...  
  };  

First, create the *.idl file; the vc140.idl generated file can be used to obtain an *.idl file containing the interfaces and annotations.
Next, add a MIDL step to your build to make sure that the C++ interface definitions are generated.
Example 2 IDL (after)

  import "docobj.idl";  
  [  
      object,local,uuid(9e66a290-4365-11d2-a997-00c04fa37ddb)  
  ]  
  interface ICustom : IUnknown {  
      HRESULT  Custom([in] long l, [out,retval] long *pLong);  
      [local] HRESULT  CustomLocal([in] long l, [out,retval] long *pLong);  
  };  
  [ version(1.0), uuid(29079a2c-5f3f-3325-99a1-3ec9c40988bb) ]  
  library Foo  
  {  
      importlib("stdole2.tlb");  
      importlib("olepro32.dll");  
          [  
              version(1.0),  
              appobject,uuid(9e66a294-4365-11d2-a997-00c04fa37ddb)  
          ]  
      coclass CFoo {  
          interface ICustom;  
      };  
  }  

Then, use ATL directly in the implementation file, as in the example code below.
Example 2 Implementation (after)

  #include <idl.header.h>  
  #include <atlbase.h>  
  class ATL_NO_VTABLE CFooImpl :  
      public ICustom,  
      public ATL::CComObjectRootEx<CComMultiThreadModel>  
  {  
  public:  
      BEGIN_COM_MAP(CFooImpl)  
      COM_INTERFACE_ENTRY(ICustom)  
      END_COM_MAP()  
  };  
  warning C4598: 'b.h': included header file specified for Ycc.h at position 2 does not match Yuc.h at that position  

Example (before):
X.cpp (-Ycc.h)

  #include "a.h"  
  #include "b.h"  
  #include "c.h"  

Z.cpp (-Yuc.h)

  #include "b.h"  
  #include "a.h"  // mismatched order relative to X.cpp  
  #include "c.h"  

Example (after)
X.cpp (-Ycc.h)

  #include "a.h"  
  #include "b.h"  
  #include "c.h"  

Z.cpp (-Yuc.h)

  #include "a.h"  
  #include "b.h" // matched order relative to X.cpp  
  #include "c.h"  
  warning C4599: '-I..' : specified for Ycc.h at position 1 does not match Yuc.h at that position  

Example (before)

  cl /c /Wall /Ycc.h -I.. X.cpp  
  cl /c /Wall /Yuc.h Z.cpp  

Example (after)

  cl /c /Wall /Ycc.h -I.. X.cpp  
  cl /c /Wall /Yuc.h -I.. Z.cpp  

What's New for C++ in Visual Studio 2013

Improved ISO C/C++ Standards Support

Compiler

MSVC supports these ISO C++11 language features:

Note

For defaulted functions, using =default to request memberwise move constructors and move assignment operators is not supported.

C99 Libraries

Declarations and implementations are added for missing functions in these headers: math.h, ctype.h, wctype.h, stdio.h, stdlib.h, and wchar.h. Also added are the new headers complex.h, stdbool.h, fenv.h, and inttypes.h, and implementations for all the functions declared in them. There are new C++ wrapper headers (ccomplex, cfenv, cinttypes, ctgmath) and a number of others are updated (ccomplex, cctype, clocale, cmath, cstdint, cstdio, cstring, cwchar, and cwctype).

Standard Template Library

Support for the C++11 explicit conversion operators, initializer lists, scoped enums, and variadic templates. All containers now support the C++11 fine-grained element requirements. Support for these C++14 features:

Breaking Changes

This improved support for ISO C/C++ standards may require changes to existing code so that it conforms to C++11 and compiles correctly in Visual C++ in Visual Studio 2013.

Visual C++ Library Enhancements

C++ Application Performance

Profile Guided Optimization (PGO) enhancements

Windows Runtime App Development Support

Note

In addition to the C++-specific features and enhancements that are described in this section, other enhancements in Visual Studio also can help you write better Windows Runtime apps.

Diagnostics Enhancements

3-D Graphics Enhancements

IDE and Productivity

Improved Code Formatting. You can apply more formatting settings to your C++ code. By using these settings, you can control new-line placement of braces and keywords, indentation, spacing, and line wrapping. Code is automatically formatted when you complete statements and blocks, and when you paste code into a file.

Brace Completion. C++ code now auto-completes the closing characters that correspond to these opening characters:

Additional C++ Auto-completion Features.

Find All References now automatically resolves and filters references in the background after it displays the list of textual matches.

Context-Based Member List Filtering. Inaccessible members are filtered out of the IntelliSense member lists. For example, private members are not displayed in the member list unless you are modifying the code that implements the type. While the member list is open, you can press Ctrl+J to remove one level of filtering (applies only to the current member list window). You can press Ctrl+J again to remove the textual filtering and show every member.

Parameter Help Scrolling. The displayed function signature in the parameter-help tooltip now changes based on the number of parameters you've actually typed, rather than just showing an arbitrary signature and not updating it based on the current context. Parameter help also functions correctly when it's displayed on nested functions.

Toggle Header/Code File. You can now toggle between a header and its corresponding code file by using a command on the shortcut menu, or a keyboard shortcut.

Resizable C++ Project Properties Window

Auto-generation of Event Handler Code in C++/CX and C++/CLI. When you are typing code to add an event handler in a C++/CX or C++/CLI code file, the editor can automatically generate the delegate instance and event-handler definition. A tooltip window appears when event-handler code can be auto-generated.

DPI Awareness Enhancement. The DPI Awareness setting for application manifest files now supports the "Per Monitor High DPI Aware" setting.

Faster Configuration Switching. For large applications, switching configurations—especially subsequent switching operations—execute much more quickly.

Build Time Efficiency. Numerous optimizations and multi-core utilization make builds faster, especially for large projects. Incremental builds for C++ applications that have references to C++ WinMD are also much faster.

What's New for C++ in Visual Studio 2012

Improved C++11 Standards Support

Standard Template Library

Other C++11 Enhancements

enum class Element { Hydrogen, Helium, Lithium, Beryllium };  
void func1(Element e);  
func1(Hydrogen); // error C2065: 'Hydrogen' : undeclared identifier  
func1(Element::Helium); // OK  

Windows Runtime App Development Support

Compiler and Linker

New in Visual Studio 2012 Update 1

Target Windows XP when you build your C++ code. You can use the Microsoft C++ compiler and libraries to target Windows XP and Windows Server 2003.

Parallel Programming Support

C++ Accelerated Massive Parallelism (AMP)

C++ AMP accelerates the execution of your C++ code by taking advantage of the data-parallel hardware that's ordinarily present as a GPU on a discrete graphics card. The C++ AMP programming model includes multidimensional arrays, indexing, memory transfer, tiling, and a mathematical function library. By using C++ AMP language extensions and compiler restrictions, you can control how data is moved from the CPU to the GPU and back.

Debugging. The debugging experience for apps that use C++ AMP to target the GPU is just like debugging for other C++ apps. This includes the new parallel debugging additions that were mentioned earlier.

Profiling. There is now profiling support for GPU activity that's based on C++ AMP and other Direct3D-based programming models.

General Parallel Programming Enhancements

With hardware moving to multi-core and many-core architectures, developers can no longer rely on ever-increasing clock speeds from single-cores. The parallel programming support in the Concurrency Runtime enables developers to take advantage of these new architectures. In Visual Studio 2010, powerful C++ parallelization libraries such as the Parallel Patterns Library were introduced, together with features to take advantage of concurrency by expressing sophisticated dataflow pipelines. In Visual Studio 2012, these libraries have been extended to provide better performance, more control, and richer support for the parallel patterns that developers need most. The breadth of the offering now includes:

General Parallel Debugging Enhancements

In addition to the Parallel Tasks window and Parallel Stacks window, Visual Studio 2012 offers a new Parallel Watch window so that you can examine the values of an expression across all threads and processes, and perform sorting and filtering on the result. You can also use your own visualizers to extend the window, and you can take advantage of the new multi-process support across all tool windows.

IDE

Visual Studio Templates support. You can now use the Visual Studio Templates technology to author C++ project and item templates.

Asynchronous Solution Load. Projects are now loaded asynchronously—the key parts of the solution first—so that you can start working faster.

Automated deployment for remote debugging. Deployment of files for remote debugging in Visual C++ has been simplified. The Deploy option on the project context menu automatically copies to the remote computer the files that are specified in the debugging configuration properties. Copying files manually to the remote computer is no longer required.

C++/CLI IntelliSense. C++/CLI now has full IntelliSense support. IntelliSense features such as Quick Info, Parameter Help, List Members, and Auto Completion now work for C++/CLI. In addition, the other IntelliSense and IDE enhancements listed in this document also work for C++/CLI.

Richer IntelliSense Tooltips. C++ IntelliSense Quick Info tooltips now show richer XML documentation comments style information. If you are using an API from a library—for example, C++ AMP—that has XML documentation comments, then the IntelliSense tooltip shows more information than just the declaration. Also, if your code has the XML documentation comments, IntelliSense tooltips will show the richer information.

C++ Code Constructs. Skeleton code is available for switch, if-else, for loop, and other basic code constructs, in the List Members drop-down list. Select a piece of code from the list to insert it into your code and then fill in the required logic. You can also create your own custom pieces of code for use in the editor.

List Members Enhancements. The List Members drop-down list appears automatically as you type code into the code editor. Results are filtered, so that only relevant members are displayed as you type. You can control the kind of filtering logic that's used by the Member List—in the Options dialog box under Text Editor > C/C++ > Advanced.

Semantic Colorization. Types, enumerations, macros, and other C++ tokens now have colorization by default.

Reference Highlighting. Selecting a symbol now highlights all instances of the symbol in the current file. Press Ctrl+Shift+Up Arrow or Ctrl+Shift+Down Arrow to move among the highlighted references. You can turn this feature off in the Options dialog box, under Text Editor > C/C++ > Advanced.

Application Lifecycle Management Tools

Static Code Analysis

Static analysis for C++ has been updated to provide richer error context information, more analysis rules, and better analysis results. In the new Code Analysis window, you can filter messages by keyword, project, and severity. When you select a message in the window, the line in the code where the message was triggered is highlighted in the code editor. For certain C++ warnings, the message lists source lines that show the execution path that leads to the warning; decision points and the reasons for taking that specific path are highlighted. Code analysis is included in most editions of Visual Studio 2012. In the Professional, Premium, and Ultimate editions, all rules are included. In the Express editions for Windows 8 and Windows Phone, just the most critical warnings are included. Code analysis is not included in the Express edition for Web. Here are some other code analysis enhancements:

Updated Unit Test Framework

Use the new C++ unit test framework in Visual Studio to write C++ unit tests. Add a new unit test project to your existing C++ solution by locating the C++ Unit Test Project template under the Visual C++ category in the New Project dialog box. Start writing your unit tests in the generated TEST_METHOD code stub in the Unittest1.cpp file. When the test code is written, build the solution. When you want to run the tests, open a Unit Test Explorer window by choosing View > Other Windows > Unit Test Explorer, and then, on the shortcut menu for the test case you want, choose Run selected test. After the test run finishes, you can view test results and additional stack trace information in the same window.

Architecture Dependency Graphs

To understand your code better, you can now generate dependency graphs for the binary, class, namespace, and include files in a solution. On the menu bar, choose Architecture > Generate Dependency Graph, and then For Solution or For Include File to generate a dependency graph. When the graph generation is complete, you can explore it by expanding each node, learn dependency relationships by moving between nodes, and browse source code by choosing View Content on the shortcut menu for a node. To generate a dependency graph for include files, on the shortcut menu for a *.cpp source code file or *.h header file, choose Generate Graph of Include Files.

Architecture Explorer

By using the Architecture Explorer, you can explore the assets in your C++ solution, projects, or files. On the menu bar, choose Architecture > Windows > Architecture Explorer. You can select a node you are interested in, for example, Class View. In this case, the right side of the tool window is expanded with a list of namespaces. If you select a namespace, a new column shows a list of the classes, structs, and enums in this namespace. You can continue to explore these assets, or go back to the column on the far left to start another query. See Find Code with Architecture Explorer.

Code Coverage

Code coverage has been updated to dynamically instrument binaries at runtime. This lowers the configuration overhead and provides better performance. You can also collect code-coverage data from unit tests for C++ apps. When you have created C++ unit tests, you can use Unit Test Explorer to discover tests in your solution. To run the unit tests and collect code coverage data for them, in Unit Test Explorer, choose Analyze Code Coverage. You can examine the code coverage results in the Code Coverage Results window—on the menu bar, choose Test > Windows > Code Coverage Results.

What's New for C++ in Visual Studio 2010

C++ Compiler and Linker

auto Keyword. The auto keyword has a new purpose. Use the default meaning of the auto keyword to declare a variable whose type is deduced from the initialization expression in the declaration of the variable. The /Zc:auto compiler option invokes either the new or the previous meaning of the auto keyword.

decltype Type Specifier. The decltype type specifier returns the type of a specified expression. Use the decltype type specifier in combination with the auto keyword to declare a type that is either complex or known only to the compiler. For example, use the combination to declare a template function whose return type depends on the types of its template arguments. Or, declare a template function that calls another function, and then returns the return type of the called function.

Lambda Expressions. Lambda functions have a function body but no name. Lambda functions combine the best characteristics of function pointers and function objects. Use a lambda function by itself, as a template function parameter instead of a function object, or together with the auto keyword to declare a variable whose type is a lambda.

Rvalue Reference. The rvalue reference declarator (&&) declares a reference to an rvalue. An rvalue reference lets you use move semantics and perfect forwarding to write more efficient constructors, functions, and templates.

static_assert Declaration. A static_assert declaration tests a software assertion at compile time, unlike other assertion mechanisms that test at run time. If the assertion fails, the compilation fails and a specified error message is issued.

nullptr and __nullptr Keywords. MSVC lets you use the nullptr keyword with native code or with managed code. The nullptr keyword indicates that an object handle, interior pointer, or native pointer type does not point to an object. The compiler interprets nullptr to be managed code when you use the /clr compiler option, and native code when you do not use the /clr option. The Microsoft-specific __nullptr keyword has the same meaning as nullptr, but it applies to native code only. If you compile native C/C++ code by using the /clr compiler option, the compiler cannot determine whether the nullptr keyword is a native or a managed term. To make your intention clear to the compiler, use the nullptr keyword to specify the managed term, and __nullptr to specify the native term.

/Zc:trigraphs Compiler Option. By default, support for trigraphs is disabled. Use the /Zc:trigraphs compiler option to enable trigraphs support. A trigraph consists of two consecutive question marks (??) followed by a unique third character. The compiler replaces a trigraph with the corresponding punctuation character. For example, the compiler replaces the ??= trigraph with the # (number sign) character. Use trigraphs in C source files that use a character set that does not contain certain punctuation characters.

New Profile-Guided Optimization Option. PogoSafeMode is a new profile-guided optimization option that lets you specify whether to use safe mode or fast mode when you optimize your application. Safe mode is thread-safe, but it is slower than fast mode. Fast mode is the default behavior.

New Common Language Runtime (CLR) Option /clr:nostdlib. A new option is added for /clr (Common Language Runtime Compilation). If different versions of the same libraries are included, a compile error is issued. The new option lets you exclude the default CLR libraries so that your program can use a specified version.

New pragma directive detect_mismatch. The pragma directive detect_mismatch lets you put a tag in your files that is compared to other tags that have the same name. If there are multiple values for the same name, the linker issues an error.

XOP Intrinsics, FMA4 Intrinsics, and LWP Intrinsics. New intrinsic functions have been added to support the XOP Intrinsics Added for Visual Studio 2010 SP1, FMA4 Intrinsics Added for Visual Studio 2010 SP1, and LWP Intrinsics Added for Visual Studio 2010 SP1 processor technologies. Use __cpuid, __cpuidex to determine which processor technologies are supported on a particular computer.

Visual Studio C++ projects and the Build System

MSBuild. Visual C++ solutions and projects are now built by using MSBuild.exe, which replaces VCBuild.exe. MSBuild is the same flexible, extensible, XML-based build tool that is used by the other Visual Studio languages and project types. Because of this change, Visual Studio C++ project files now use an XML file format and have the .vcxproj file name extension. Visual Studio C++ project files from earlier versions of Visual Studio are automatically converted to the new file format.

VC++ Directories. The VC++ directories setting is now located in two places. Use project property pages to set per-project values for VC++ directories. Use the Property Manager and a property sheet to set global, per-configuration values for VC++ directories.

Project-to-Project Dependencies. In earlier releases, defined dependencies between projects were stored in the solution file. When these solutions are converted to the new project file format, dependencies are converted to project-to-project references. This change can affect applications because the concepts of solution dependencies and project-to-project references are different.

Macros and Environment Variables. The new _ITERATOR_DEBUG_LEVEL macro invokes debugging support for iterators. Use this macro instead of the older _SECURE_SCL and _HAS_ITERATOR_DEBUGGING macros.

Visual C++ Libraries

Concurrency Runtime Libraries. The Concurrency Runtime framework supports applications and components that run simultaneously, and is the framework for programming concurrent applications in Visual C++. To support concurrent-application programming, the Parallel Patterns Library (PPL) provides general-purpose containers and algorithms for performing fine-grained parallelism. The Asynchronous Agents Library provides an actor-based programming model and message passing interfaces for coarse-grained dataflow and pipelining tasks.

Standard C++ Library. The following list describes many of the changes that have been made to the Standard C++ Library.

Microsoft Foundation Class (MFC) Library

Windows 7 Features. MFC supports many Windows 7 features, for example, the Ribbon user interface (UI), the Taskbar, jump lists, tabbed thumbnails, thumbnail previews, the progress bar, icon overlay, and search indexing. Because MFC automatically supports many Windows 7 features, you may not have to modify your existing application. To support other features in new applications, use the MFC Application Wizard to specify the functionality you want to use.

Multi-touch Awareness. MFC supports applications that have a multi-touch user interface, for example, applications that are written for the Microsoft Surface operating system. A multi-touch application can handle Windows touch messages and gesture messages, which are combinations of touch messages. Just register your application for touch and gesture events and the operating system will route multi-touch events to your event handlers.

High-DPI Awareness. By default, MFC applications are now High-DPI-aware. If an application is High-DPI (high dots per inch) aware, the operating system can scale windows, text, and other UI elements to the current screen resolution. This means that a scaled image is more likely to be correctly laid out, and not clipped or pixelated.

Restart Manager. The restart manager automatically saves documents and restarts your application if it unexpectedly closes or restarts. For example, you can use the restart manager to start your application after it is closed by an automatic update. For more information about how to configure your application to use the restart manager, see How to: Add Restart Manager Support.

CTaskDialog. The CTaskDialog class can be used instead of the standard AfxMessageBox message box. The CTaskDialog class displays and gathers more information than the standard message box does.

SafeInt Library

The new SafeInt Library performs safe arithmetic operations that account for integer overflow. This library also compares different kinds of integers.

New Active Template Library (ATL) macros

New macros have been added to ATL to expand the functionality of PROP_ENTRY_TYPE and PROP_ENTRY_TYPE_EX. PROP_ENTRY_INTERFACE and PROP_ENTRY_INTERFACE_EX let you add a list of valid CLSIDs. PROP_ENTRY_INTERFACE_CALLBACK and PROP_ENTRY_INTERFACE_CALLBACK_EX let you specify a callback function to determine whether a CLSID is valid.

/analyze Warnings

Most /analyze (Enterprise Code Analysis) warnings have been removed from the C Run-Time (CRT), MFC, and ATL libraries.

Animation and D2D support

MFC now supports animation and Direct2D graphics. The MFC library has several new MFC classes and functions to support this functionality. There are also two new walkthroughs to show how to add a D2D object and an animation object to a project. These walkthroughs are Walkthrough: Adding a D2D Object to an MFC Project and Walkthrough: Adding Animation to an MFC Project.

IDE

Improved IntelliSense. IntelliSense for Visual C++ has been completely redesigned to be faster, more accurate, and able to handle larger projects. To achieve this improvement, the IDE makes a distinction between how a developer views and modifies source code, and how the IDE uses source code and project settings to build a solution. Because of this separation of duties, browsing features such as Class View and the new Navigate To dialog box are handled by a system that is based on a new SQL Server desktop database (.sdf) file that replaces the old no compile browse (.ncb) file. IntelliSense features such as Quick Information, Auto Completion, and Parameter Help parse translation units only when required. Hybrid features such as the new Call Hierarchy window use a combination of the browse and IntelliSense features. Because IntelliSense processes only the information that you require at the moment, the IDE is more responsive. Also, because information is more up to date, IDE views and windows are more accurate. Finally, because the IDE infrastructure is better organized, more capable, and more scalable, it can handle larger projects.

Improved IntelliSense Errors. The IDE better detects errors that could cause a loss of IntelliSense and displays red wavy underlines under them. In addition, the IDE reports IntelliSense errors to the Error List Window. To display the code that is causing the problem, double-click the error in the Error List Window.

#include Auto-Complete Feature. The IDE supports auto-completion for the #include keyword. When you type #include, the IDE creates a drop-down list box of valid header files. If you continue by typing a file name, the IDE filters the list based on your entry. At any point, you can select from the list the file you want to include. This lets you quickly include files without knowing the exact file name.

Navigate To. The Navigate To dialog box lets you search for all symbols and files in your project that match a specified string. Search results are immediately revised as you type additional characters in your search string. The Results feedback field tells you the number of items found and helps you decide whether to constrain your search. The Kind/Scope, Location, and Preview feedback fields help you disambiguate items that have similar names. In addition, you can extend this feature to support other programming languages.

Parallel Debugging and Profiling. The Visual Studio debugger is aware of the Concurrency Runtime and helps you troubleshoot parallel processing applications. You can use the new concurrency profiler tool to visualize the overall behavior of your application. Also, you can use new tool windows to visualize the state of tasks and their call stacks.

Ribbon Designer. The Ribbon Designer is a graphical editor that lets you create and modify an MFC ribbon UI. The final ribbon UI is represented by an XML-based resource file (.mfcribbon-ms). For existing applications, you can capture your current ribbon UI by temporarily adding a few lines of code and then invoking the Ribbon Designer. After the ribbon resource file is created, you can replace your handwritten ribbon UI code with a few statements that load the ribbon resource.

Call Hierarchy. The Call Hierarchy window lets you navigate to all functions that are called by a particular function, or to all functions that call a particular function.

Tools

MFC Class Wizard. Visual C++ 2010 brings back the well-regarded MFC Class Wizard tool. The MFC Class Wizard is a convenient way to add classes, messages, and variables to a project without having to manually modify sets of source files.

ATL Control Wizard. The ATL Control Wizard no longer automatically populates the ProgID field. If an ATL control does not have a ProgID, other tools may not work with it. One example of a tool that requires controls to have a ProgID is the Insert Active Control dialog box. For more information about the dialog box, see Insert ActiveX controls.

Microsoft Macro Assembler Reference

The addition of the YMMWORD data type supports the 256-bit multimedia operands that are included in the Intel Advanced Vector Extensions (AVX) instructions.

What's New for C++ in Visual Studio 2008

Visual C++ Integrated Development Environment (IDE)

Visual C++ Libraries

General

STL/CLR Library

MFC Library

C++ Support Library

ATL Server

Visual C++ Compiler and Linker

Compiler Changes

Linker Changes

What's New for C++ in Visual Studio 2005

The following features were new in Visual C++ 2005 Service Pack 1:

Intrinsics for x86 and x64

Intrinsics for x64 Only

New Language Keywords

__sptr, __uptr

New Compiler Features

The compiler has breaking changes in this release.

Profile-Guided Optimizations

Unicode Support in the Compiler and Linker

New Language Features

New Preprocessor Features

New Linker Features

New Linker Utility Features

New NMAKE Features

New MASM Features

New CRT Features

What's New for C++ in Visual Studio 2003

Compiler

Attributes

Linker features

The following linker switches have been added:

MASM

The .SAFESEH directive and /safeseh ml.exe option were added.

See also

Visual C++ Porting and Upgrading Guide