From what I know if a class is not an aggregate then it is sure not a POD.
However in the following code
#include <iostream>
#include <type_traits>
class NotAggregate2
{
int x; //x is private by default and non-static
};
int main()
{
std::cout << std::boolalpha;
std::cout << std::is_pod<NotAggregate2>::value << '\n';
std::cout << std::is_aggregate <NotAggregate2>::value << '\n';
}
which have output:
true
false
NotAggregate2 is not aggregate but a POD type.
So can a non-aggregate class be a POD class?