# Proxy Objects

accessors can't return a reference to the Primitive because its memory layout is abstracted. Instead a Proxy object is returned. That Proxy supports importing or exporting data to and from the Container. The actual type of Proxy objects is an implementation detail, but they all support the same public interface which we will document.

Each accessor [index] operator returns a Proxy object.

Each const_accessor [index] operator returns a ConstProxy object.

The Proxy objects provide a Data Member Interface where for each data member of value_type they are representing, a member access method is defined which returns a new Proxy or ConstProxy representing just that data member. Users can drill down through a complex data structure to get a Proxy representing the exact data member they need versus importing and exporting the entire Primitive value.

Proxy objects also overload the following operators if the underlying value_type supports the operator:

==, !=, <, >, <=, >=, +, -, *, /, %, &&, ||, &, |, ^, ~, *, +, -, !, +=, -=, *=, /=, %=, >>=, <<=, &=, |=, ^=, ++, --

Parent topic: User-Level Interface

- 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.
- 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.