This is the mail archive of the
mailing list for the GCC project.
Re: threads in C++
- To: Mike Stump <mrs at windriver dot com>
- Subject: Re: threads in C++
- From: Dima Volodin <dvv at dvv dot org>
- Date: Tue, 16 Nov 1999 11:28:10 -0500
- CC: jlarmour at cygnus dot co dot uk, gcc at gcc dot gnu dot org
- Organization: Huh?
- References: <199911152311.PAA14747@kankakee.wrs.com>
Mike Stump wrote:
> > Date: Mon, 15 Nov 1999 12:14:22 -0500
> > From: Dima Volodin <firstname.lastname@example.org>
> > > Not necessarily. You could use a static member function. But if you need
> > > to get at object data, you'll have to get that passed in explicitly.
> > POSIX doesn't say you can use a "static member function", ergo you
> > can not. If the trick works for g++, it doesn't mean it will work
> > for any other compiler.
> They also don't say that you can do with with functions named foo, but
> guess what, you can.
Guess what, you can't. Unless foo is a C function whose type is void*(void*),
in which case POSIX together with the C Language standard (all of them) say
that it doesn't really matter if it's foo or bar or baz.
> Or let me put this another way, C++ guarantees
> that this can be done.
Now would you care to quote the appropriate part of the C++ Standard that
guarantees you that? The problem is that parts from Bjarne Stroustrup's book
and from the Standard that were referenced and quoted in my exchange with
Jonathan Larmour state something very different, that is that C++ _doesn't_
guarantee you that.