You can find an explanation of what is_pod tests for and what it does not test for here: https://en.cppreference.com/w/cpp/types/is_pod
A description of what PODTypes are is here: https://en.cppreference.com/w/cpp/named_req/PODType
To meet the test of POD, the type has to be:
both trivial and standard-layout
TrivialType is defined here: https://en.cppreference.com/w/cpp/named_req/TrivialType
Standard Layout Type here: https://en.cppreference.com/w/cpp/named_req/StandardLayoutType
TrivialType further defines two requirements:
- TriviallyCopyable
- If the type is a class type or array thereof, the class has one or more eligible default constructors, all of which are trivial.
Trivially Copyable is defined here: https://en.cppreference.com/w/cpp/named_req/TriviallyCopyable
Based on this: http://www.cplusplus.com/reference/type_traits/is_trivially_copyable/ and Does a c++ struct have a default constructor?, it is clear that since implicit constructors are used, the struct is trivially copyable. Also see: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/n4659.pdf page 41.
Since no constructor is defined, there is an implicit default constructor, therefore satisfying both requirements of a Trivial Type
Standard Layout requirements:
- All non-static data members have the same access control
- Has no virtual functions or virtual base classes
- Has no non-static data members of reference type
- All non-static data members and base classes are themselves standard layout types
- Has no two (possibly indirect) base class subobjects of the same type
- Has all non-static data members and bit-fields declared in the same class (either all in the derived or all in some base)
- None of the base class subobjects has the same type as: for non-union types, as the first non-static data member (see empty base optimization), and, recursively, the first non-static data member of that data member if it has non-union class type, or all non-static data members of that data member if it has union type, or an element of that data member if it has array type, etc.
Therefore it has a standard layout as well.
Therefore, being of standard layout and trivial, the struct should be considered POD.