The POD structure should be a trivial class (C ++ 11 ยง9 [class] / 10):
A POD structure is a non-unit class that is a trivial class and a standard layout class and does not have non-static data members such as non-POD struct, non-POD union (or an array of such types).
ยง9 [class] / 6 defines what a trivial class is:
A trivial class is a class that has a trivial default constructor and is trivially copied.
ยง12.1 [class.ctor] / 5 defines what a trivial default constructor is. It begins:
The default constructor is trivial if not provided by the user and ...
The default constructor, Foo<T> provided to the user and is therefore non-trivial. Therefore, Foo<int> not a POD. This, however, is the standard layout.
source share