- A value_type can be exported or imported from the Proxy.
- Conversion operator is used to export the value_type
- Alternatively the Proxy can be passed to the functionunproxyto export avalue_type
- Assignment operator = is used to import value_type into the Proxy
- 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
- If the operator was an assignment, the result is imported back into the Member and returns the proxy
- Otherwise a result is returned.
- Data Member Interface.
- For each data member of value_type
- A member access method is defined which returns a Member proxy representing just that member.
The type of the data the Proxy is representing
Returns: exports a copy of the Proxy’s value.
NOTE: constant return value prevents rvalue assignment for structs offering some protection against code that expected a modifiable reference.
Imports a_value into container at the position the Proxy is representing.
Returns: the same constant value_type it was passed.
NOTE: This behavior is different from traditional assignment operators that return *this. Choice was to enable efficient chaining of assignment operators versus returning a Proxy which would have to export the value it had just imported.
Exports value from the other Proxy and imports it.
Returns: A reference to this Proxy obect.
Returns: Proxy 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: Proxy 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: Proxy 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: Proxy 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