Opened 12 years ago
Closed 11 years ago
#5167 closed Bugs (wontfix)
Allow proto::extends default ctor to leave the proto_expr_ member uninitialized
Reported by: | Owned by: | Eric Niebler | |
---|---|---|---|
Milestone: | To Be Determined | Component: | proto |
Version: | Boost 1.46.0 | Severity: | Optimization |
Keywords: | proto, extends, default constructor | Cc: |
Description
Proposal:
turn default ctor for proto::extends in proto/extends.hpp from:
extends(): proto_expr_(){}
to:
extends() { }
Rational: It is up to the derived class to decide if expr can be left in undefined state (and to control it), and not to the extends base class.
Note:
See TracTickets
for help on using tickets.
After considering this, I've decided that there isn't sufficient justification for
extends
to leave its member uninitialized. I recommendBOOST_PROTO_EXTENDS
for when you don't want to initialize the member.