ConstProxy
ConstProxy object provides access to a
specific constant primitive, primitive data member, or nested data member
within a primitive for an element in a container.
Description
const_accessor [index] or a ConstProxy object’s Data Member Interfaces
return ConstProxy objects. That ConstProxy object represents the constant
primitive, primitive data member, or nested data member within a primitive for
an element in a container. The ConstProxy object has the following features:
- A value_type can be exported or imported from the ConstProxy.
- Conversion operator is used to export the value_type
- Alternatively the ConstProxy can be passed to the functionunproxyto export avalue_type
- Overloads the following operators if the underlying value_type supports the operator
- ==, !=, <, >, <=, >=, +, -, *, /, %, &&, ||, &, |, ^, ~, *, +, -, !
- When an operator is called the following occurs:
- value_type is exported
- The operator applied to the exported value
- returns the result.
- Data Member Interface.
- For each data member of value_type
- A member access method is defined which returns a Member ConstProxy representing just that member.
Member Type
| Description
|
---|---|
| The type of the data the ConstProxy is representing
|
Member
| Description
|
---|---|
| Returns: exports a copy of the ConstProxy’s value.
NOTE: constant return value prevents rvalue assignment for structs
offering some protection against code that expected a modifiable reference.
|
| Returns: ConstProxy instance representing the 1st data member of
the value_type
NOTE: actual method name is the name of the value_type’s 1st data
member
|
| Returns: ConstProxy instance representing the 2nd data member of
the value_type.
NOTE: actual method name is the name of the value_type’s 2nd data
member.
|
| Returns: ConstProxy instance representing the ...th data member of
the value_type.
NOTE: actual method name is the name of the value_type’s ...th
data member.
|
| Returns: ConstProxy instance representing the Nth data member of
the value_type.
NOTE: actual method name is the name of the value_type’s Nth data
member
|