🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #2277

Re: static in inline

#2277
From: John Max Skaller
Date: Sun, 22 Oct 1995 07:00
34 lines
1556 bytes
krotoff@boy.nmd.msu.ru (Alexsander Krotoff) wrote:
>Hello C++ gurus,
>
>I know, this question is asked here some time ago, but I found
>no changes in the October Working Draft and want to ask it again.
>
>If the the static variable is defined in the body of `inline'
>function, and compiler sucseed to substitute function body
>sevral times, shall these function copyes share common
>static variable? 

    Yes. And AFAIK the appropriate words ARE in the latest WP.

>What is about initialization of this static
>variable with non-constant? What shall happen, if the function
>body is defined and substituted in the number of compilation
>units?

   Thats the implementors problem.

-- 
John Max Skaller               voice: 61-2-566-2189
81 Glebe Point Rd              fax:   61-2-660-0850
GLEBE NSW 2037                 email: maxtal@suphys.physics.oz.au
AUSTRALIA                      email: skaller@maxtal.com.au




---
[ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Technical Details
Message-ID: <46bl2f$qnr@oznet07.ozemail.com.au>
Path: arc1-ca.pugleaf.net!howland.reston.ans.net!agate!agate!Matt
References: <462qb5$ee1@alpha.phys.msu.su>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!howland.reston.ans.net!agate!agate!Matt
From: John Max Skaller <maxtal@suphys.physics.su.oz.au>
Newsgroups: comp.std.c++
Subject: Re: static in inline
Date: 22 Oct 1995 07:00:42 GMT
Organization: MAXTAL
Approved: Matt@Austern
Message-ID: <46bl2f$qnr@oznet07.ozemail.com.au>
References: <462qb5$ee1@alpha.phys.msu.su>
NNTP-Posting-Host: austern.hip.berkeley.edu