Boost logo

Boost :

From: Beman Dawes (beman_at_[hidden])
Date: 2000-11-07 13:12:25

At 12:00 PM 11/7/2000 -0500, David Abrahams wrote:

>There's a reason we stick to ALL_UPPERCASE and prefix with BOOST_ for
>names: to avoid name conflicts by adhering to a common convention. If we
>make the prescription in our coding guidelines but fail to follow that
>prescription in our public interface macros, we are not only undermining
>the convention but, IMO, arrogantly flaunting our ability to do so.

I'm trying to discover if it makes sense to have two conventions, one for
implementation artifact macros, and another for public interface macros. I
don't see that as arrogant, just trying to find a better way.

Both the standard and boost already use two conventions for other names;
template parameters start with an uppercase letter, other ordinary names

Maybe I'm the only one who finds it really jarring to see
BOOST_STATIC_ASSERT as a function name in the middle of mainline code, and
would like to find a better convention.

Perhaps I should just work on a core proposal for a new language
feature. All of the macro uses we are talking about are needed to get
__FILE__ and __LINE__. How about two new special symbols:

namespace boost {
   static_assert( bool exp, const char * file=__FILE_AT_USE,
                  int line=__LINE_AT_USE );

The compiler is required to replace these with the appropriate value at the
point of a call to static_assert(), rather than at point of declaration.


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