Created
January 22, 2016 15:20
-
-
Save JIghtuse/f844d189c11c7e676818 to your computer and use it in GitHub Desktop.
Determine if structure is a POD
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #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"; | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://youtu.be/iLiDezv_Frk?t=559