Proxy: Next Generation Polymorphism in C++
template <class T, class F> // freestanding
concept inplace_proxiable_target = proxiable<implementation-defined-pointer<T>, F>;
template <facade F, inplace_proxiable_target<F> T, class... Args> // freestanding
proxy<F> make_proxy_inplace(Args&&... args)
noexcept(std::is_nothrow_constructible_v<T, Args...>);
template <facade F, inplace_proxiable_target<F> T, class U, class... Args> // freestanding
proxy<F> make_proxy_inplace(std::initializer_list<U> il, Args&&... args)
noexcept(std::is_nothrow_constructible_v<T, std::initializer_list<U>&, Args...>);
template <facade F, class T> // freestanding
proxy<F> make_proxy_inplace(T&& value)
noexcept(std::is_nothrow_constructible_v<std::decay_t<T>, T>)
requires(inplace_proxiable_target<std::decay_t<T>, F>);
The function template make_proxy_inplace
overloads allow creation of proxy
with no-allocation guarantee, and also support freestanding.
Full Changelog: https://github.com/microsoft/proxy/compare/2.3.1...2.3.2
Full Changelog: https://github.com/microsoft/proxy/compare/2.3.0...2.3.1
We have reviewed the general design of the last version of proxy
in the last ISO C++ committee meeting. The committee unanimously agreed that the problem addressed by proxy
is significant and merits resolution. Based on the feedback, there is a strong possibility that proxy
will advance to the next stage of review for the C++26 standardization. Please refer to the latest paper and presentation slides for more details.
In this update, we have resolved some technical comments from the committee and user feedback. Specifically,
allocate_proxy
has been added to the library that accepts any allocator (you can now hook proxy
with any of your memory pool seamlessly!). See https://github.com/microsoft/proxy/pull/76
PRO_DEF_MEMBER_DISPATCH_WITH_DEFAULT
and PRO_DEF_FREE_DISPATCH_WITH_DEFAULT
are added. proxy
can now be aware of the default implementation of a dispatch and optimize code generation. See https://github.com/microsoft/proxy/pull/79
tuple-like
type is now allowed. Although it does not increase much usability, it will precisely match the wording in the paper's next revision. See https://github.com/microsoft/proxy/pull/76
Full Changelog: https://github.com/microsoft/proxy/compare/2.2.1...2.3.0
proxy
and optimize memory layout for small VTABLE by @mingxwa in https://github.com/microsoft/proxy/pull/70
Full Changelog: https://github.com/microsoft/proxy/compare/2.2.0...2.2.1
noexcept
by @mingxwa in https://github.com/microsoft/proxy/pull/62 (Thanks to @psiha's idea #61)noexcept
for copyability, relocatability and destructibility metadata by @mingxwa in https://github.com/microsoft/proxy/pull/63
Full Changelog: https://github.com/microsoft/proxy/compare/2.1.2...2.2.0
proxy
by @frederick-vs-ja in https://github.com/microsoft/proxy/pull/59
Full Changelog: https://github.com/microsoft/proxy/compare/2.1.1...2.1.2
Full Changelog: https://github.com/microsoft/proxy/compare/2.1.0...2.1.1
Full Changelog: https://github.com/microsoft/proxy/compare/2.0.0...2.1.0
After a whole year of evolution, proxy
has finally pumping its version to 2.0.0. This is a major update to the proxy
library. Thanks to all the valuable feedback from you! A new ISO C++ proposal will soon become available with detailed technical specifications.
Here is a list of major changes comparing to 1.0.0:
pro::dispatch
and pro::facade
have been removed. Please use the new macros (starting with PRO_
) to define dispatches and facades. See README for more details.proxy::invoke()
is now const
-qualified. (#22, #24, feature suggested by @xiaosa-zhz and @misirlou-tg).proxy::operator()
was added when there is only one dispatch defined in the facade.struct proxiable_ptr_constraints
is added as an abstraction of constraints to pointers, making it easier to learn and use. 3 prototypes are provided, while only 1 was provided in 1.0.0 due to syntax limitation. The requirements of facade
are also updated. (feature suggested by @tian-lt)basic_facade
and facade
.Minor changes including build system improvements are listed below.
make_proxy
by @mingxwa in https://github.com/microsoft/proxy/pull/17
Full Changelog: https://github.com/microsoft/proxy/compare/1.0.0...2.0.0
@tian-lt Improved CMake toolchain configuration.