automatic) is indicated by the storage specifier thread_local. Any object which could have static storage duration (i.e., lifetime spanning the entire execution of the program) may be given thread-local duration instead. The intent is that like any other static-duration variable, a thread-local object can be initialized using a constructor and destroyed using a destructor. Explicitly defaulted special member functions In C++03, the compiler provides, for classes that do not provide them for themselves, a default constructor, a copy constructor, a copy assignment operator (operator=), and a destructor. The programmer can override these defaults by defining custom versions. C++ also defines several global operators (such as operator new) that work on all classes, which the programmer can override. However, there is very little control over creating these defaults. Making a class inherently non-copyable, for example, may be done by declaring a private copy constructor and copy assignment operator and not defining them. Attempting to use these functions is a violation of the One Definition Rule (ODR). While a diagnostic message is not required, violations may result in a linker error. In the case of the default constructor, the compiler will not generate a default constructor if a class is defined with any constructors. This is useful in many cases, but it is also useful to be able to have both specialized constructors and the compiler-generated default. C++11 allows the explicit defaulting and deleting of these special member functions. For example, this class explicitly declares that a default constructor can be used: class SomeType { SomeType() = default; //The default constructor is explicitly stated. SomeType(OtherType value); }; Explicitly deleted functions A function can be explicitly disabled. This is useful for preventing implicit type conversions. The = delete specifier can be used to prohibit calling a function with particular parameter types. For example: void noInt(double i); void noInt(int) = delete; An attempt to call noInt() with an int parameter will be rejected by the compiler, instead of performing a silent conversion to double. Calling noInt() with a float still works. It is possible to prohibit calling the function with any type other than double by using a template: double onlyDouble(double d) {return d;} template<typename T> double onlyDouble(T) = delete; calling onlyDouble(1.0) will work, while onlyDouble(1.0f) will generate a compiler error. Class member functions and constructors can also be deleted. For example, it is possible to prevent copying class objects by deleting the copy