|
Boost : |
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 05:00:57
On 15/11/2013 14:31, Antony Polukhin wrote:
> type_info::construct<T>() works with the type T, while
> boost::type_id_rtti_only(variable) attempts to determinate the real type of
> variable.
OK, I see, thank you.
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 ?
Also using a local type as a template argument is illegal in C++03 (not
in C++11 any more).
For instance :
void f()
{
struct s {};
boost::type_id< s >(); // illegal in C++03
typeid( s ); // legal
}
Maybe it should be stated in the documentation as this is an area where
boost::type_id is not a drop-in replacement for typeid (in C++03) ?
Cheers,
MAT.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk