[C++-sig] wrapping typedef equivalent types
Ralf W. Grosse-Kunstleve
rwgk at yahoo.com
Fri Oct 21 19:16:58 CEST 2005
--- David Abrahams <dave at boost-consulting.com> wrote:
> Well, you should be using type_id<X>() rather than writing it out
> longhand.
OK, I am doing that now. Thanks! The code shown previously is now:
if ( boost::python::type_id<af::const_ref<std::size_t> >()
!= boost::python::type_id<af::const_ref<unsigned> >()) {
> > boost/python/type_id.hpp has all kinds of platform-specific adjustments,
> e.g.
> > the "signed int" vs. "int" workaround for "Older EDG-based compilers". Is
> it
> > safe to assume that boost::is_same<> is true if and only if
> > boost::python::type_info instances compare equal?
>
> Except on implementations that we can effectively consider buggy, yes.
Well, I spent years considering buggy implementations. I am going to stick to
the boost::python::type_id<> comparisons as long as the Boost.Python registry
does.
Cheers,
Ralf
__________________________________
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com
More information about the Cplusplus-sig
mailing list