Boost logo

Proto :

Subject: [proto] Default constructor of proto::extends
From: Antoine de Maricourt ([hidden])
Date: 2011-02-06 18:01:32

Hi Eric,

is there any reason why the default ctor of proto::extends uses the
following form:

      : proto_expr_()

instead of simply

   extends() {}

I use proto::extends over expressions that hold x86 SIMD registers (like
proto::terminal<__m128i>), and the current version of proto::extends
default ctor yields to a __m128i() call, which fills the register with
zeros, while I wanted to keep it uninitialized.

Apparently the compiler (g++, 4.6 and previous versions as well) is
enable to detect this is unneeded, as the register is in fact
initialized a few instructions later, and the only way I was able to get
rid of this was to remove the explicit call to proto_expr_ ctor in the
extends ctor.



Proto list run by eric at