Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!gatech!ulysses!hector!jss From: jss@hector..UUCP (Jerry Schwarz) Newsgroups: comp.lang.c++ Subject: Re: static member data initialization query Message-ID: <2594@ulysses.homer.nj.att.com> Date: Wed, 20-May-87 17:55:57 EDT Article-I.D.: ulysses.2594 Posted: Wed May 20 17:55:57 1987 Date-Received: Sat, 23-May-87 07:46:38 EDT References: <2464@nlm-vax.arpa> <2755@cit-vax.Caltech.Edu> Sender: daemon@ulysses.homer.nj.att.com Reply-To: jss@hector (Jerry Schwarz) Organization: AT&T Bell Labs, Murray Hill Lines: 23 In article <2755@cit-vax.Caltech.Edu> jon@oddhack.Caltech.EDU (Jon Leech) writes: > >Note that >8.5.1 in the book says ``No initializer can be specified for a static >member, and it cannot be of a class with a constructor.'' > This has frequently been misread as meaning that there cannot be constructor in the class containing the static. What it really says (at least what Bjarne intended it to say) is that the static member cannot have a type that has a constructor. For example class S { static int x ; S() ; } ; is ok, but (given the above) class T { static S s ; } ; is not. Jerry Schwarz