[cfe-dev] deprecating copy construction and assignment

Howard Hinnant hhinnant at apple.com
Wed Mar 28 11:08:52 PDT 2012


In a few instances the implicit definition of a defaulted copy constructor and copy assignment operator is deprecated in C++11.  E.g.:

struct A
{
  // A(const A&) = default;  // deprecated

  // A& operator=(const A&) = default;  // deprecated

  ~A();
};

Should we warn when both -std=c++11 and -Wdeprecated is given?

Howard




More information about the cfe-dev mailing list