[C++-sig] Re: [Implementation] Calling wrapped functions, converters, policies
Niall Douglas
s_sourceforge at nedprod.com
Thu Sep 18 23:53:04 CEST 2003
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 18 Sep 2003 at 17:33, David Abrahams wrote:
> > GCC-XML is broken in some areas, but I'm sure its bugs will be fixed
> > with time. My only concern is that GCC is overly conservative in its
> > interpretation of the C++ standard - code which MSVC permits (and I
> > would permit) GCC barfs on.
>
> Actually it's the opposite. Those areas where GCC restricts what you
> can do but MSVC does not are not open to interpretation: GCC gets it
> right and MSVC gets it wrong. In fact, in some of the areas where
> different interpretations of the standard are possible (e.g. Koenig
> Lookup), GCC is IMO far too liberal, which breaks otherwise correct
> code.
I think one can approach this from both angles then. I personally had
found GCC to barf on code MSVC7.1 is happy with, but then I write and
debug on MSVC7.1 first and then compile on GCC. If you tend to go the
other way round, you'd probably find it the other way.
My main bugbear with GCC is it forces const temporaries. This makes
destructive copy construction semantics severely castrated, so much
so you usually must #ifdef hack in a copy constructor taking a const
reference just on GCC :(
I know all the usual arguments about temporaries should be const. I
strongly disagree. C++ is all about giving plenty of rope to the
programmer to hang themselves with where that rope /could/ be used
for something useful and no other better way is available for doing
it. And destructive copy construction is clearly implied when it
takes a non-const reference.
Cheers,
Niall
-----BEGIN PGP SIGNATURE-----
Version: idw's PGP-Frontend 4.9.6.1 / 9-2003 + PGP 8.0.2
iQA/AwUBP2opQMEcvDLFGKbPEQItUgCgm0Mb4VLNpHGNWhHQBoX2zl1LzbIAoJS0
RS0OxLUrEzjk8bZPX8ICiJLM
=mjoq
-----END PGP SIGNATURE-----
More information about the Cplusplus-sig
mailing list