Subject: Re: [boost] [TypeIndex] Peer review period for library acceptance begins, ending Thurs 21st Nov
From: Mathieu Champlon (m.champlon_at_[hidden])
Date: 2013-11-16 11:50:50
On 16/11/2013 16:58, Antony Polukhin wrote:
> 2013/11/16 Mathieu Champlon <m.champlon_at_[hidden]>
>> Do you think getting the type info of the "current" type of a variable (as
>> opposed to it's real type) could sometimes prove useful ?
>> Could it be worth adding a function in TypeIndex ?
> This is a very very common use case in Boost and widely used technique in
> libraries that use type erasure. Examples are Boost.Function, Boost.Any,
> Boost,Graph, Boost.Math and others...
> Such function is already in TypeIndex library, see boost::type_info<T>().
Yes, but I meant given :
#define SOME_MACRO_IN_MY_LIBRARY( variable )
I cannot use boost::type_info<T>() easily can I ?
Granted I could do boost::type_info< BOOST_TYPEOF( variable ) >() but
that's a bit cumbersome compared to for instance a simple
boost::type_info( variable ).
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk