Problems with PR 21210

Gabriel Dos Reis gdr@integrable-solutions.net
Wed Jun 1 18:58:00 GMT 2005


Mark Mitchell <mark@codesourcery.com> writes:

| Nathan (Jasper) Myers wrote:
| 
| > Let's not be hasty.  We can minimize (maybe eliminate) broken code
| > when the C++ committee does speak just by turning off lots of
| > implicit conversions.
| 
| Already done!  Right now, we permit no implicit conversions to
| __complex__; hence the PR.

yes. However the suggestion is that we can do better by using 
*value-initialization* instead of zero-initialization.  The former
gives far more useful semantics.  The argument that arrays do not have a
default constructor do not look compeling considering the fact 

   struct S {
      double data[2];
      S() : data() { }
   }; 

has well defined semantics and S() triggers value-initialization of data.
There is nothing unsound there.  It is both technically and
practically sound.

-- Gaby



More information about the Libstdc++ mailing list