Boost logo

Boost :

From: Jonathan Turkanis (technews_at_[hidden])
Date: 2004-12-27 17:53:14

David Greene wrote:
> I asked this question a year or two ago on the list.
> Has anyone come up with a good way to dump template metaprogramming
> information at compile time? I'd like to be able to do this both
> in a "print" sense (compiler warnings) and an "error" sence (compiler
> abort).

I think <boost/mpl/print.hpp> is supposed to do this, although I'm not sure how
well it works over a wide range of compilers.

> I hacked something together last week that sort of does the job.
> There's a print<Message, FileLine> class that has a constructor with
> an unused variable declared. gcc gives a nice warning with -Wall.
> I also have some hacked macros to pass file and line number
> information
> to the printer.

I think you'll find that different compilers give very different results. I
suggest you try it on three or four compilers, at least.


Boost list run by bdawes at, gregod at, cpdaniel at, john at