Boost logo

Boost :

From: John Maddock (John_Maddock_at_[hidden])
Date: 2000-07-26 06:44:28


>If I understand it correctly, the indirection provided by ct_assert_test
required to force instantiation of compile_time_assert. If
compile_time_assert were typedefed directly, the compiler would not
instantiate the typedef. Or something like that... Anyhow, it would be
nice to document why it is necessary.

Um, actually, no I don't think so, once I had figured out that
"sizeof(incomplete_type)" gave useful error messages, I had to find a way
to wrap this up, originally I just assigned this to an enum, but Steve
wasn't so happy with this and prefered a typedef, so we added the
ct_assert_test just as a way of converting an integral-constant-expression
to a type.

BTW there is some difference of opinion on names here: I tend to prefer
something with "assert" in the title, Steve (and others I think) have gone
for "postulate", any preferences?

- John.

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