Boost logo

Boost :

From: Douglas Gregor (gregod_at_[hidden])
Date: 2002-03-26 19:36:55


The attached patch adds a new type trait that extracts a built-in or POD type
with a given alignment (and size). It's a copy-and-paste port of
boost/python/converter/from_python_data.hpp into alignment_traits.hpp, with
the interface:

template<int Align, int Size = Align>
struct type_with_alignment {
  typedef /* some POD or built-in */ type;
};

Okay on GCC 2.95.3 and GCC 3.0.3; Comeau 4.2.45.2 crashes because of the
incomplete member function pointer (workaround suggestions? - maybe just a
type with a few virtual base classes and a virtual function?).

        Doug



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