Boost logo

Boost :

From: Rene Rivera (grafik.list_at_[hidden])
Date: 2005-05-14 17:01:17


Rene Rivera wrote:
> Rene Rivera wrote:
>
>> Peter Dimov wrote:
>>
>>> boost::checked_delete has a workaround for CW ignoring unreferenced
>>> dependent typedefs which might be of help here.
>>
>> That's definitely the problem.. I'll look at the workaround and see if
>> it can be used.
>
> Well it helped for the function context. But of course "(void)
> sizeof(x);" breaks the rest of the non-function contexts that
> static_assert is used in.
>
> I've been trying all kinds of tricks to get the parser to instantiate
> the assert types. But CW takes the "does not require instantiation" of
> 1.14.7.1 to the extreme.

That should be 14.7.1 :-) I've added a test to static_assert to see if
other compilers have this problem.

Howard's suggestions didn't help either. For example this.. doesn't work
with CodeWarrior 8.x. And it case it was missed, this is not a problem
with the 9.x version.

====
#include <msl_utility>
template <int N> int foo() {
   typedef Metrowerks::int2type<sizeof(
     Metrowerks::compile_assert< N < 2 > my_assertion;
   return N;
}
int main() {
   return foo<9>();
}
====

This failure only worries me because it's likely hiding either a bunch
of other failures, or successes. So if anyone has some idea on how to
make a macro generate different code based on function or non-function
context I would _love_ to know.

PS.I already tried the *FUNCTION* pp symbols, but those are compile time
substitutions not preprocessor subs.

-- 
-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. - http://redshift-software.com
-- rrivera/acm.org - grafik/redshift-software.com
-- 102708583/icq - grafikrobot/aim - Grafik/jabber.org

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk