Boost logo

Boost :

From: Douglas Gregor (gregod_at_[hidden])
Date: 2002-03-27 00:26:41

On Tuesday 26 March 2002 11:56 pm, you wrote:
> Have you left me enough hooks to hijack this for my code? In particular,
> I need to be able, given a T&, to find a type aligned with T, even on
> MSVC. That's what my code currently does. If it's possible to use the
> new type_traits stuff, I'm happy.
> -Dave


template<typename Reference>
struct referent_storage {
  typedef typename remove_cv<typename
remove_reference<Reference>::type>::type referent;

  BOOST_STATIC_CONSTANT(std::size_t, target =

  typedef typename type_with_alignment<target>::type align_t;

  typedef aligned_storage<align_t,referent_size<Reference>::value> type;


Boost list run by bdawes at, gregod at, cpdaniel at, john at