ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> boost
boost
[boost] Re: assert() replacement?
by Greg Colvin other posts by this author
Aug 31 1999 5:30PM messages near this date
[boost] Re: assert() replacement? | [boost] Re: assert() replacement?
From: Valentin Bonnard <Bonnard.V@[...]..> 
>  ...
>  /users/bonnard/debug_mode.hpp:
>  > extern const bool debug_mode = true
> 
>  /users/bonnard/debug_mode.cpp:
>  > #include debug_mode.hpp
>  > const bool debug_mode;

I think that, despite the extern, the declaration in debug_mode.hpp is a
definition, because of the initializer:


3.1 Declarations and definitions [basic.def]

1 A declaration (clause _dcl.dcl_) introduces names into a translation
unit or redeclares names introduced by previous declarations. A dec-
laration specifies the interpretation and attributes of these names.

2 A declaration is a definition unless it declares a function without
specifying the function's body (_dcl.fct.def_), it contains the extern
specifier (_dcl.stc_) or a linkage-specification1) (_dcl.link_) and
neither an initializer nor a function-body, it declares a static data
member in a class declaration (_class.static_), it is a class name
declaration (_class.name_), or it is a typedef declaration (_dcl.type-
def_), a using-declaration (_namespace.udecl_), or a using-directive
(_namespace.udir_).
Thread:
Beman Dawes
Valentin Bonnard
Valentin Bonnard
Valentin Bonnard
Valentin Bonnard
Beman Dawes
Valentin Bonnard
Valentin Bonnard
Greg Colvin
Greg Colvin
Greg Colvin
Greg Colvin
Greg Colvin

Beman Dawes
Valentin Bonnard
Greg Colvin
Andy Glew
Andy Glew
Greg Colvin
Beman Dawes

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved