POD (Plain old Data) concept:
arithmetic Types (3.9.1), enumeration types, pointer types, and pointer to member types (3.9.2), and cv-qualified (Note 2 ) versions of these types (3.9.3) are collectively called scalar types. Scalar types, pod-struct types,pod-union types (clause 9), arrays of such types and cv-qualified versions of these types ( 3.9.3) is collectively called POD types.
If a class has no non-trivial constructor, destructor, and copy assignmet operator These things, the class has actually degenerated into a pod type, is equivalent to a struct in C.
pod types include the following types:
1. Scalar type, basic type of C + +
- Signed integer types (signed char, short, int, long),
- unsigned integer types (unsigned char,unsigned short, unsigned int,unsigned long),
- Char and wchar_t, and
- bool.
- float, double, and long double
- Pointer-to-void (void *),
- Pointer-to-object and Pointer-to-static-member-data (both of the form t* when pointing to an object of Typet), and
- Pointer-to-function and Pointer-to-static-member-function (both of the form T (*) (...) When pointing to a function that re Turns an object of Typet).
- Pointer-to-nonstatic-member-data (of the form T C::* when pointing to one of ClassC's data members which has type T), and
- Pointer-to-nonstatic-member-functions (of the form T (C::*) (...) when pointing to one of ClassC's member functions that re Turns an object of Typet).
2. User-defined class type:
- Non-static data (including arrays) of any pointer-to-member type,
- Non-static data (including arrays) of any non-pod class type,
- Non-static data of any reference type,
- user-defined copy assignment operator, nor
- User-defined destructor.
- User-declared Constructors,
- Private or protected non-static data members,
- base classes, nor
- Virtual functions.
C + + pod type