home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!mcsun!sunic!lth.se!newsuser
- From: dag@control.lth.se (Dag Bruck)
- Subject: Re: con/destruction of fundamental type
- Message-ID: <1992Aug21.061457.7511@lth.se>
- Sender: newsuser@lth.se (LTH network news server)
- Organization: Department of Automatic Control, Lund, Sweden
- References: <1992Aug20.161921.11717@ericsson.se>
- Date: Fri, 21 Aug 1992 06:14:57 GMT
- Lines: 19
-
- In <comp.lang.c++> jonas@beppe.ericsson.se writes:
- >
- >I have tried this small example with both HP and Sun CC but both claim
- >than con/destruction as defined is illegal.
- >
- >main(){
- > int i, *p = &i;
- >
- > p->int::int(1);
- > p->int::~int();
- >}
-
- Explicit destruction of a built-in type is legal, see ARM 12.4, page
- 280. I didn't find any example for the constructor, but I'm cretain
- it's legal.
-
- Conclusion: the compilers are wrong.
-
- -- Dag
-