Skip to content

Instantly share code, notes, and snippets.

@JIghtuse
Created January 22, 2016 15:20
Show Gist options
  • Select an option

  • Save JIghtuse/f844d189c11c7e676818 to your computer and use it in GitHub Desktop.

Select an option

Save JIghtuse/f844d189c11c7e676818 to your computer and use it in GitHub Desktop.
Determine if structure is a POD
#include <iostream>
#include <type_traits>
using std::cout;
struct Complex
{
float real;
float imag;
};
int main()
{
cout << "is Complex a POD? "
<< (std::is_pod<Complex>() ? "yes" : "no") << "\n";
}
@JIghtuse
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment