#include <string.h>#include <type_traits> struct Something{ int a; int b; Something(char* buffer = nullptr) { if (buffer) { memcpy(this, buffer, sizeof(Something)); } };}; int main() { static_assert(std::is_pod<Something>::value, "Something must be a POD type!");}
Standard input is empty
prog.cpp: In function ‘int main()’: prog.cpp:18:2: error: static assertion failed: Something must be a POD type! static_assert(std::is_pod<Something>::value, "Something must be a POD type!"); ^~~~~~~~~~~~~
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!