Boost logo

Boost :

From: Beman Dawes (beman_at_[hidden])
Date: 2000-07-31 10:36:53


William Kempf wrote:

> I strongly suggest you pick a different name. Preconditions already
> have a very well known meaning, for which a compile time assert does
> not work. Specifically, a precondition is one of the three
> components that build up the foundation of DBC (design by contract):
> precondition, postcondition and invariant. All of these are runtime
> assertions. A precondition is that that must be upheld before a
> function can be called (aka it's what you must insure when you call a
> function).

A strong case for a different name.

Dave Abrahams wrote:

>They're not completely unrelated: the compile-time assert is a very
special
>case of precondition, where the precondition can be checked by the
>compiler.
>That said, I think the name "precondition" suffers the same problem as
many
>of the other names that we've seen: namely, that it looks like just
another
>way to write "assert". I am getting tired of listening to myself nag
y'all
>about this, but I insist that the name needs to contain some indication
>that
>there is static checking going on:
>
>BOOST_COMPILER_ASSERT

That one still looks like yet-another assert.

>BOOST_STATIC_PRECONDITION
>BOOST_STATIC_ASSERT
>BOOST_STATIC_CHECK
>
>all work, with BOOST_STATIC_ASSERT being my favorite so far.

I could live with any of those three.

--Beman


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