Boost logo

Boost :

From: Cromwell Enage (sponage_at_[hidden])
Date: 2007-04-17 16:47:07

--- Stjepan Rajko wrote:
> 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...

I was thinking "data" type.

> 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 my automata library, I defined a data_type
metafunction that removes const, pointer, reference,
volatile, and [] qualifiers from the input type.

> In any case, I figured the right thing might be in
> Boost already and I just haven't found it.
> Any suggestions?

FWIW, I should be asking the same question. I'm
curious myself.

                              Cromwell D. Enage

Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around

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