Boost logo

Boost Users :

Subject: Re: [Boost-users] trick to print a type at compile-time
From: Hicham Mouline (hicham_at_[hidden])
Date: 2010-09-08 23:30:08


> -----Original Message-----
> From: boost-users-bounces_at_[hidden] [mailto:boost-users-
> bounces_at_[hidden]] On Behalf Of Steven Watanabe
> Sent: 09 September 2010 03:56
> To: boost-users_at_[hidden]
> Subject: Re: [Boost-users] trick to print a type at compile-time
>
> AMDG
>
> Hicham Mouline wrote:
> > I tried both ways:
> >
> > boost::mpl::print<result_type> myvar;
> >
> > and
> >
> > template <typename T>
> > struct print_error {
> > };
> > typedef typename print_error<result_type>::type my_print_error;
> > my_print_error myvar;
> >
> > In both cases, the bit in the error in msvc2008 just shows:
> >
> > 1> with
> > 1> [
> > 1> T=result_type
> > 1> ]
> >
> > it doesn't print what that type actually is.
> >
>
> MSVC does this for typedefs except when they are
> declared in a class template. Unfortunately, I don't
> know of any way to get MSVC to print the actual type
> in other cases.
>
> In Christ,
> Steven Watanabe

I've managed to change code a bit to allow for it to be printed at runtime
instead:

throw std::exception( typeid(result_type).name() )

the error I'm getting is related to a fusion::vector with 1 element only.
I'll post another question about this now.

Thanks,


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net