471,897 Members | 2,191 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,897 software developers and data experts.

Is it possible to determine if a structure is non-POD?

Is there a way to determine at run-time (or maybe at compile-time)
that a given class is a POD structure or it has a constructor, without
generating compiler errors?

Let's say I have a template T that takes class X as an argument, and I
want to have a clear test that tells me if X is POD or not.

Thanks,

--
hm

Jun 30 '07 #1
1 1396
On 2007-06-30 15:43, hovik wrote:
Is there a way to determine at run-time (or maybe at compile-time)
that a given class is a POD structure or it has a constructor, without
generating compiler errors?

Let's say I have a template T that takes class X as an argument, and I
want to have a clear test that tells me if X is POD or not.
There's something like that in Boost, search for is_pod.

--
Erik Wikström
Jun 30 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

12 posts views Thread by Jeff Lanfield | last post: by
18 posts views Thread by Christopher W. Douglas | last post: by
3 posts views Thread by Muhammad Farooq-i-Azam | last post: by
21 posts views Thread by Joakim Hove | last post: by
2 posts views Thread by natzol | last post: by
12 posts views Thread by Kislay | last post: by
reply views Thread by YellowAndGreen | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.