std::is_pod
Min standard notice:
Header: <type_traits>
std::is_pod is a UnaryTypeTrait.
# Declarations
template< class T >
struct is_pod;
(since C++11) (deprecated in C++20)
# Example
#include <type_traits>
struct A { int m; };
static_assert(std::is_pod_v<A> == true);
class B: public A { int m; };
static_assert(std::is_pod_v<B> == false);
struct C { virtual void foo(); };
static_assert(std::is_pod_v<C> == false);
int main() {}
# Defect reports
| DR | Applied to | Behavior as published | Correct behavior |
|---|---|---|---|
| LWG 2015 | C++11 | T could be an array of incompleteclass type with unknown bound | the behavior isundefined in this case |