Boost logo

Boost :

From: Stjepan Rajko (stipe_at_[hidden])
Date: 2007-04-17 12:46:46


Hi,

I am wondering if there is a construct in boost which, given a type T,
returns the underlying "storable" type - say if T is int & the
"storable_type" should be int. I'm not sure if the word "storable" is
the best word...

The scenario I am facing is making a function call that takes a
parameter of type T, where I need to prepare the parameter before
calling (specifically, deserializing it from an archive). Hence, as
far as I can tell, I need to declare a variable of the underlying
storable type, and get the right value inside it.

So far, I've been using:

template<typename T>
struct storable : public boost::remove_const<typename
boost::remove_reference<T>::type > {};

but I'm not sure if that cuts it in all situations. In any case, I
figured the right thing might be in Boost already and I just haven't
found it.

Any suggestions?

Thanks!

Stjepan


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