From: Fernando Cacciola (fernando_cacciola_at_[hidden])
Date: 2002-12-10 13:04:29
----- Original Message -----
From: "David Abrahams" <dave_at_[hidden]>
To: "Boost mailing list" <boost_at_[hidden]>
Sent: Tuesday, December 10, 2002 1:10 PM
Subject: Re: [boost] Compile-time print
> "David A. Greene" <greened_at_[hidden]> writes:
> > Fernando Cacciola wrote:
> >> ----- Original Message -----
> >> From: "David A. Greene" <greened_at_[hidden]>
> >> To: <boost_at_[hidden]>
> >> Sent: Tuesday, November 05, 2002 5:10 PM
> >> Subject: [boost] Compile-time print
> >>>Hi gang,
> >>>Has anyone come across a compile-time print metafunction?
> >> Yep. Look at the attached file: static_print.hpp
> > Is this going into Boost somewhere eventually? I think it's
> > a critically useful thing for metaprogramming.
> > -Dave
> That's an interesting technique. Are you required to be able to
> compare signed char* and unsigned char*?
I don't understand the question :-)
Are you asking if it legal to make this comparison?
Or if the technique requires is?
The technique is simply to produce a warning that is unlikely to be turned
Anything would work.
In bcc5.5.1, comparing chars of different types issues a warning, and I
figured that all other compilers would do just the same.
But we can figure out some expression that leads to a (severe) warning in
most, if not all, compilers.
> I don't really understand what's going on with it, but Comeau online
> is rejecting it:
Yes, I've just tested it and Comeau says the comparing chars of different
types is an error, not a diagnostic.
Q: Are compilers required to issue a diagnostic on certain expressions or
are they allowed to issue an error.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk