Skip to content

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

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_builder
facade_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_dispatch
conversion_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
not_implemented Exception thrown by weak_dispatch for the default implementation
operator_dispatch Dispatch type for operator expressions with accessibility
proxiable_ptr_constraints Defines the constraints of a pointer type to instantiate a proxy
proxy_indirect_accessor Provides indirection accessibility for proxy
proxy_view
observer_facade
Non-owning proxy optimized for raw pointer types
proxy Wraps a pointer object matching specified facade
weak_dispatch Weak dispatch type with a default implementation that throws not_implemented
weak_proxy
weak_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::format
skills::wformat
facade skill set: formatting via the standard formatting functions
skills::rtti
skills::indirect_rtti
skills::direct_rtti
facade skill set: RTTI via proxy_cast and proxy_typeid

Functions

Name Description
access_proxy Accesses a proxy object via an accessor
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 the underlying pointer 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_format
skills::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"