Intel® C++ Compiler 16.0 User and Reference Guide

Proxy

Proxy object provides access to a specific Primitive, Primitive data member, or nested data member within a Primitive for an element in a container.

Description

accessor [index] or a Proxy object’s Data Member Interfaces return Proxy objects. That Proxy object represents the Primitive, Primitive data member, or nested data member within a Primitive for an element in a container. The Proxy object has the following features:

Member Type

Description

typedef implementation-defined value_type

The type of the data the Proxy is representing

Member

Description

operator value_type const () const;

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.

const value_type &
operator = (const value_type &a_value);

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.

Proxy & operator = (const Proxy &other);

Exports value from the other Proxy and imports it.

Returns: A reference to this Proxy obect.

auto name_of_values_data_member_1()const;

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

auto name_of_values_data_member_2()const;

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.

auto name_of_values_data_member_...()const;

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.

auto name_of_values_data_member_N()const;

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