|
Boost Users : |
Subject: Re: [Boost-users] trick to print a type at compile-time
From: Hicham Mouline (hicham_at_[hidden])
Date: 2010-09-08 22:38:56
> -----Original Message-----
> From: boost-users-bounces_at_[hidden] [mailto:boost-users-
> bounces_at_[hidden]] On Behalf Of Dave Abrahams
> Sent: 08 September 2010 14:58
> To: boost-users_at_[hidden]
> Subject: Re: [Boost-users] trick to print a type at compile-time
>
> On Wed, Sep 8, 2010 at 8:56 AM, Eric Niebler <eric_at_[hidden]> wrote:
>
> > boost::mpl::print in boost/mpl/print.hpp. Neither seem to be
> documented.
>
> mpl::print is mostly good for those cases where you need to *not*
> cause a compilation error, perhaps because you are trying to follow
> recursive instantiations. Otherwise, I'd go with an explicit error;
> you'll get less noise.
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.
regards,
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