Proxy 4 Specifications
This document provides the API specifications for the C++ library Proxy (version 4). All the documented concepts, classes, and functions are defined in the namespace pro. Unless otherwise specified, all facilities are freestanding by default.
Since 3.4.0: To support side-by-side installation of multiple major releases, each version of Proxy is wrapped in an inline namespace named after its major number. In a translation unit that includes both Proxy 3 and Proxy 4, the APIs can be referenced explicitly as pro::v3::foo or pro::v4::foo The current release exports v4 as the inline (default) namespace, so unqualified names resolve to pro::v4.
Header <proxy.h>
Concepts
| Name | Description |
|---|---|
facade |
Specifies that a type models a "facade" |
inplace_proxiable_target |
Specifies that a value type can instantiate a proxy without allocation |
proxiable_target |
Specifies that a reference type can instantiate a proxy_view |
proxiable |
Specifies that a pointer type can instantiate a proxy |
Classes
| Name | Description |
|---|---|
bad_proxy_cast |
Exception thrown by the value-returning forms of proxy_cast on a type mismatch |
basic_facade_builderfacade_builder |
Provides capability to build a facade type at compile-time |
constraint_level |
Defines the 4 constraint levels of a special member function |
explicit_conversion_dispatchconversion_dispatch |
Dispatch type for explicit conversion expressions with accessibility |
facade_aware_overload_t |
Specifies a facade-aware overload template |
implicit_conversion_dispatch |
Dispatch type for implicit conversion expressions with accessibility |
is_bitwise_trivially_relocatable |
Specifies whether a type is bitwise trivially relocatable |
not_implemented |
Exception thrown by weak_dispatch for the default implementation |
operator_dispatch |
Dispatch type for operator expressions with accessibility |
proxy_indirect_accessor |
Provides indirection accessibility for proxy |
proxy_viewobserver_facade |
Non-owning proxy optimized for raw pointer types |
proxy |
Wraps a pointer object matching specified facade |
substitution_dispatch |
Dispatch type for proxy substitution with accessibility |
weak_dispatch |
Weak dispatch type with a default implementation that throws not_implemented |
weak_proxyweak_facade |
proxy with weak ownership |
Alias Templates
| Name | Description |
|---|---|
skills::as_view |
facade skill set: implicit conversion to proxy_view |
skills::as_weak |
facade skill set: implicit conversion to weak_proxy |
skills::formatskills::wformat |
facade skill set: formatting via the standard formatting functions |
skills::rttiskills::indirect_rttiskills::direct_rtti |
facade skill set: RTTI via proxy_cast and proxy_typeid |
skills::slim |
facade skill set: restriction to slim pointer types |
Functions
| Name | Description |
|---|---|
allocate_proxy_shared |
Creates a proxy object with shared ownership using an allocator |
allocate_proxy |
Creates a proxy object with an allocator |
make_proxy_inplace |
Creates a proxy object with strong no-allocation guarantee |
make_proxy_shared |
Creates a proxy object with shared ownership |
make_proxy_view |
Creates a proxy_view object |
make_proxy |
Creates a proxy object potentially with heap allocation |
proxy_invoke |
Invokes a proxy with a specified convention |
proxy_reflect |
Acquires reflection information of a contained type |
Header <proxy_macros.h>
Also included in proxy.h.
Macros
| Name | Description |
|---|---|
__msft_lib_proxy |
Feature test macro |
PRO_DEF_FREE_AS_MEM_DISPATCH |
Defines a dispatch type for free function call expressions with accessibility via a member function |
PRO_DEF_FREE_DISPATCH |
Defines a dispatch type for free function call expressions with accessibility |
PRO_DEF_MEM_DISPATCH |
Defines a dispatch type for member function call expressions with accessibility |
Header <proxy_fmt.h>
Alias Templates
| Name | Description |
|---|---|
skills::fmt_formatskills::fmt_wformat |
facade skill set: formatting via the {fmt} library |
Named Requirements
| Name | Description |
|---|---|
| ProAccessible | Specifies that a type provides accessibility to proxy |
| ProBasicConvention | Specifies that a type potentially models a "convention" |
| ProBasicFacade | Specifies that a type potentially models a "facade" of proxy |
| ProBasicReflection | Specifies that a type potentially models a "reflection" |
| ProConvention | Specifies that a type models a "convention" |
| ProDispatch | Specifies that a type models a "dispatch" |
| ProFacade | Specifies that a type models a "facade" of proxy |
| ProOverload | Specifies that a type models an "overload" |
| ProReflection | Specifies that a type models a "reflection" |