-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users- bounces@lists.boost.org] On Behalf Of Steven Watanabe Sent: 09 September 2010 03:56 To: boost-users@lists.boost.org Subject: Re: [Boost-users] trick to print a type at compile-time
AMDG
Hicham Mouline wrote:
I tried both ways:
boost::mpl::print
myvar; and
template <typename T> struct print_error { }; typedef typename print_error
::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,