Boost logo

Boost :

From: Kevin S. Van Horn (kevin.vanhorn_at_[hidden])
Date: 2001-11-20 12:13:53


On Tue, 20 Nov 2001, Carl Daniel wrote:

> (btw - has anyone ever come up with an is_pod<T> solution?).

Well, as a concept check, how about something like

  template <typename T>
  struct is_pod {
    typedef union { int x; T y; } foo;
  };

Any instantiation of is_pod<T> for a non-POD type T should cause the
compiler to reject the program.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk