y‰SŽÒнŒ}zC/C++Ž ..
[2ch|¥Menu]
228:ƒfƒtƒHƒ‹ƒg‚Ì–¼–³‚µ‚³‚ñ
07/11/10 12:43:08
>>224
‚³‚Á‚«‚©‚çŽÀ‘•ˆË‘¶‚¾‚ÆŒ¾‚Á‚Ä‚é‚Ì‚Á‚ÄA–¼‘O‹óŠÔƒXƒR[ƒv‚É’è‹`‚µ‚½ const •Ï”‚Ì
˜b‚¶‚á‚È‚¢‚ÌH

ƒNƒ‰ƒX‚Ì static const ‚ȃƒ“ƒo•Ï”‚̓Nƒ‰ƒX’è‹`“à‚Å‚Í錾‚µ‚©‚³‚ê‚È‚¢‚Ì‚ÅA
•Ê“r’è‹`‚ª•K—vB®”Œ^‚ÉŒÀ‚Á‚ÄA錾‚ɂ‚¯‚½‰Šú’l‚ðŽ‚Â’è”Ž®‚Æ‚µ‚ÄŽg‚¦‚é
‚Æ‚¢‚¤“Á•ʃ‹[ƒ‹‚ª‚ ‚邾‚¯B

C++ 2003 ‹KŠi‚Ì 9.4.2 p2 ‚æ‚è
> The declaration of a static data member in its class definition is not a definition and may be of an
> incomplete type other than cv-qualified void. The definition for a static data member shall appear in a
> namespace scope enclosing the memberfs class definition.

“¯‚¶‚­ 9.4.2 p4
> If a static data member is of const integral or const enumeration type, its declaration in the class
> definition can specify a constant-initializer which shall be an integral constant expression (5.19). In that
> case, the member can appear in integral constant expressions. The member shall still be defined in a namespace
> scope if it is used in the program and the namespace scope definition shall not contain an initializer.



ŽŸƒy[ƒW
ÅVƒŒƒX•\ަ
ƒXƒŒƒbƒh‚ÌŒŸõ
—ÞŽ—ƒXƒŒˆê——
˜b‘è‚̃jƒ…[ƒX
‚¨‚Ü‚©‚¹ƒŠƒXƒg
¥ƒIƒvƒVƒ‡ƒ“‚ð•\ަ
‰É‚‚Ԃµ2ch

4987“ú‘O‚ÉXV/97 KB
’S“–:undef