C++ Any way to programmatically detect POD-struct?
You can probably use boost type_traits library and in particular boost::is_pod<T>::value
in an static assert.
At runtime probably not, but at compile time, you can use is_pod
trait from either C++0x standard library or Boost.TypeTraits.
static_assert(std::is_pod<YourStruct>::value);