diff --git a/.github/workflows/bvt-report.yml b/.github/workflows/bvt-report.yml index 2b3a104..087a6b9 100644 --- a/.github/workflows/bvt-report.yml +++ b/.github/workflows/bvt-report.yml @@ -23,8 +23,8 @@ jobs: cat < benchmarking-report.md # Benchmarking Report - - Generated for: [Microsoft "Proxy" library](https://github.com/microsoft/proxy) - - Commit ID: [${{ github.sha }}](https://github.com/microsoft/proxy/commit/${{ github.sha }}) + - Generated for: [C++ Proxy library](https://github.com/ngcpp/proxy) + - Commit ID: [${{ github.sha }}](https://github.com/ngcpp/proxy/commit/${{ github.sha }}) - Generated at: $(date -u +"%Y-%m-%dT%H:%M:%SZ") EOF diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index f9ba8cf..97f59e1 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,9 +1,9 @@ -# Microsoft Open Source Code of Conduct +# Next Gen C++ Foundation Code of Conduct -This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). +This project has adopted the [Contributor Covenant Code of Conduct](https://www.contributor-covenant.org/version/2/1/code_of_conduct/). Resources: -- [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/) -- [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) -- Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns +- [Contributor Covenant Code of Conduct](https://www.contributor-covenant.org/version/2/1/code_of_conduct/) +- [Contributor Covenant FAQ](https://www.contributor-covenant.org/faq/) +- Contact [conduct@ngcpp.org](mailto:conduct@ngcpp.org) with questions or concerns diff --git a/LICENSE b/LICENSE index 9e841e7..84c4f3f 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License - Copyright (c) Microsoft Corporation. + Copyright (c) 2022-2026 Microsoft Corporation. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 9d55153..14be88c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Proxy: Next Generation Polymorphism in C++ -[![Proxy-CI](https://github.com/microsoft/proxy/actions/workflows/pipeline-ci.yml/badge.svg)](https://github.com/microsoft/proxy/actions/workflows/pipeline-ci.yml) +[![Proxy-CI](https://github.com/ngcpp/proxy/actions/workflows/pipeline-ci.yml/badge.svg)](https://github.com/ngcpp/proxy/actions/workflows/pipeline-ci.yml) Are you looking to simplify the lifetime management and maintenance of polymorphic objects in C++? @@ -16,7 +16,7 @@ If so, this library is for you. "Proxy" is a modern C++ library that helps you use polymorphism (a way to use different types of objects interchangeably) without needing inheritance. -"Proxy" was created by Microsoft engineers and has been used in the Windows operating system since 2022. For many years, using inheritance was the main way to achieve polymorphism in C++. However, new programming languages like [Rust](https://doc.rust-lang.org/book/ch10-02-traits.html) offer better ways to do this. We have improved our understanding of object-oriented programming and decided to use *pointers* in C++ as the foundation for "Proxy". Specifically, the "Proxy" library is designed to be: +"Proxy" was created by Microsoft engineers and incubated at Microsoft from 2018 to Feb 2026, and has been used in the Windows operating system since 2022. It is now maintained by the Next Gen C++ Foundation (ngcpp). This repository was ported from https://github.com/microsoft/proxy, where more historical releases can be found. For many years, using inheritance was the main way to achieve polymorphism in C++. However, new programming languages like [Rust](https://doc.rust-lang.org/book/ch10-02-traits.html) offer better ways to do this. We have improved our understanding of object-oriented programming and decided to use *pointers* in C++ as the foundation for "Proxy". Specifically, the "Proxy" library is designed to be: - **Portable**: "Proxy" was implemented as a header-only library in standard C++20. It can be used on any platform while the compiler supports C++20. The majority of the library is [freestanding](https://en.cppreference.com/w/cpp/freestanding), making it feasible for embedded engineering or kernel design of an operating system. - **Non-intrusive**: An implementation type is no longer required to inherit from an abstract binding. @@ -25,11 +25,11 @@ If so, this library is for you. - **Accessible**: Learned from user feedback, accessibility has been significantly improved with intuitive syntax, good IDE compatibility, and accurate diagnostics. - **Flexible**: Not only member functions, the "abstraction" of "Proxy" allows *any* expression to be polymorphic, including free functions, operators, conversions, etc. Different abstractions can be freely composed on demand. Performance tuning is supported for experts to balance between extensibility and performance. -Please refer to the [Proxy's Frequently Asked Questions](https://microsoft.github.io/proxy/faq) for more background, and refer to the [specifications](https://microsoft.github.io/proxy/spec) for more technical details. +Please refer to the [Proxy's Frequently Asked Questions](https://ngcpp.github.io/proxy/faq) for more background, and refer to the [specifications](https://ngcpp.github.io/proxy/spec) for more technical details. ## Quick Start -"Proxy" is a header-only C++20 library. To use the library, make sure your compiler meets the [minimum requirements](#compiler-req) and just put the [proxy](https://github.com/microsoft/proxy/tree/main/include/proxy) directory in your project's include directory. Alternatively, you can install the library via: +"Proxy" is a header-only C++20 library. To use the library, make sure your compiler meets the [minimum requirements](#compiler-req) and just put the [proxy](https://github.com/ngcpp/proxy/tree/main/include/proxy) directory in your project's include directory. Alternatively, you can install the library via: - [vcpkg](https://learn.microsoft.com/en-us/vcpkg/get_started/overview): [proxy port on vcpkg.io](https://vcpkg.io/en/package/proxy) - [conan](https://conan.io/): [proxy recipe on conan.io](https://conan.io/center/recipes/proxy) @@ -39,7 +39,7 @@ Please refer to the [Proxy's Frequently Asked Questions](https://microsoft.githu CPMAddPackage( NAME msft_proxy4 GIT_TAG 4.0.0 # or above - GIT_REPOSITORY https://github.com/microsoft/proxy.git + GIT_REPOSITORY https://github.com/ngcpp/proxy.git ) target_link_libraries(main PRIVATE msft_proxy4::proxy) @@ -79,22 +79,22 @@ Here is a step-by-step explanation: - `#include `: For [`std::cout`](https://en.cppreference.com/w/cpp/io/cout). - `#include `: For [`std::string`](https://en.cppreference.com/w/cpp/string/basic_string). - `#include `: For the "Proxy" library. Most of the facilities of the library are defined in namespace `pro`. -- `struct Formattable : pro::facade_builder ... ::build {}`: Defines a facade type `Formattable`. The term "facade", formally defined as the [*ProFacade* requirements](https://microsoft.github.io/proxy/spec/ProFacade), is how the "Proxy" library models runtime abstraction. Specifically, - - [`pro::facade_builder`](https://microsoft.github.io/proxy/spec/basic_facade_builder): Provides capability to build a facade type at compile-time. - - [`add_skill`](https://microsoft.github.io/proxy/spec/basic_facade_builder/add_skill)`<`[`pro::skills::format`](https://microsoft.github.io/proxy/spec/skills_format)`>`: Specifies the capability of formatting (via [standard formatting functions](https://en.cppreference.com/w/cpp/utility/format)). - - [`build`](https://microsoft.github.io/proxy/docs/basic_facade_builder/build.html): Builds the context into a facade type. -- [`pro::proxy`](https://microsoft.github.io/proxy/spec/proxy)` p1 = &str`: Creates a `proxy` object from a raw pointer of `std::string`. `p1` behaves like a raw pointer, and does not have ownership of the underlying `std::string`. If the lifetime of `str` ends before `p1`, `p1` becomes dangling. +- `struct Formattable : pro::facade_builder ... ::build {}`: Defines a facade type `Formattable`. The term "facade", formally defined as the [*ProFacade* requirements](https://ngcpp.github.io/proxy/spec/ProFacade), is how the "Proxy" library models runtime abstraction. Specifically, + - [`pro::facade_builder`](https://ngcpp.github.io/proxy/spec/basic_facade_builder): Provides capability to build a facade type at compile-time. + - [`add_skill`](https://ngcpp.github.io/proxy/spec/basic_facade_builder/add_skill)`<`[`pro::skills::format`](https://ngcpp.github.io/proxy/spec/skills_format)`>`: Specifies the capability of formatting (via [standard formatting functions](https://en.cppreference.com/w/cpp/utility/format)). + - [`build`](https://ngcpp.github.io/proxy/docs/basic_facade_builder/build.html): Builds the context into a facade type. +- [`pro::proxy`](https://ngcpp.github.io/proxy/spec/proxy)` p1 = &str`: Creates a `proxy` object from a raw pointer of `std::string`. `p1` behaves like a raw pointer, and does not have ownership of the underlying `std::string`. If the lifetime of `str` ends before `p1`, `p1` becomes dangling. - `std::format("*p1 = {}\n", *p1)`: This is how it works. `*p1` is formatted as "Hello World" because the capability was defined in the facade `Formattable`, so it works as if by calling `std::format("*p1 = {}\n", str)`. -- [`pro::proxy`](https://microsoft.github.io/proxy/spec/proxy)` p2 = `[`std::make_unique`](https://en.cppreference.com/w/cpp/memory/unique_ptr/make_unique)`(123)`: Creates a [`std::unique_ptr`](https://en.cppreference.com/w/cpp/memory/unique_ptr)`` and converts to a `proxy`. Different from `p1`, `p2` has ownership of the underlying `int` because it is instantiated from a value of `std::unique_ptr`, and will call the destructor of `std::unique_ptr` when `p2` is destroyed, while `p1` does not have ownership of the underlying `int` because it is instantiated from a raw pointer. `p1` and `p2` are of the same type `pro::proxy`, which means you can have a function that returns `pro::proxy` without exposing any information about the implementation details to its caller. +- [`pro::proxy`](https://ngcpp.github.io/proxy/spec/proxy)` p2 = `[`std::make_unique`](https://en.cppreference.com/w/cpp/memory/unique_ptr/make_unique)`(123)`: Creates a [`std::unique_ptr`](https://en.cppreference.com/w/cpp/memory/unique_ptr)`` and converts to a `proxy`. Different from `p1`, `p2` has ownership of the underlying `int` because it is instantiated from a value of `std::unique_ptr`, and will call the destructor of `std::unique_ptr` when `p2` is destroyed, while `p1` does not have ownership of the underlying `int` because it is instantiated from a raw pointer. `p1` and `p2` are of the same type `pro::proxy`, which means you can have a function that returns `pro::proxy` without exposing any information about the implementation details to its caller. - `std::format("*p2 = {}\n", *p2)`: Formats `*p2` as "123" with no surprises. -- [`pro::proxy`](https://microsoft.github.io/proxy/spec/proxy)` p3 = `[`pro::make_proxy`](https://microsoft.github.io/proxy/spec/make_proxy)`(3.14159)`: Creates a `proxy` from a `double` without specifying the underlying pointer type. Specifically, +- [`pro::proxy`](https://ngcpp.github.io/proxy/spec/proxy)` p3 = `[`pro::make_proxy`](https://ngcpp.github.io/proxy/spec/make_proxy)`(3.14159)`: Creates a `proxy` from a `double` without specifying the underlying pointer type. Specifically, - Similar with `p2`, `p3` also has ownership of the underlying `double` value, but can effectively avoid heap allocation. - - Since the size of the underlying type (`double`) is known to be small (on major 32- or 64-bit platforms), [`pro::make_proxy`](https://microsoft.github.io/proxy/spec/make_proxy) realizes the fact at compile-time, and falls back to [`pro::make_proxy_inplace`](https://microsoft.github.io/proxy/spec/make_proxy_inplace), which guarantees no heap allocation. + - Since the size of the underlying type (`double`) is known to be small (on major 32- or 64-bit platforms), [`pro::make_proxy`](https://ngcpp.github.io/proxy/spec/make_proxy) realizes the fact at compile-time, and falls back to [`pro::make_proxy_inplace`](https://ngcpp.github.io/proxy/spec/make_proxy_inplace), which guarantees no heap allocation. - The "Proxy" library explicitly defines when heap allocation occurs or not to avoid users falling into performance hell, which is different from [`std::function`](https://en.cppreference.com/w/cpp/utility/functional/function) and other existing polymorphic wrappers in the standard. - `std::format("*p3 = {:.2f}\n", *p3)`: Formats `*p3` as "3.14" as per the [standard format specification](https://en.cppreference.com/w/cpp/utility/format/spec) with no surprises. - When `main` returns, `p2` and `p3` will destroy the underlying objects, while `p1` does nothing because it holds a raw pointer that does not have ownership of the underlying `std::string`. -Note: If you prefer the library to be consumed as a (C++20) module, refer to [C++20 Modules support](https://microsoft.github.io/proxy/modules_support). +Note: If you prefer the library to be consumed as a (C++20) module, refer to [C++20 Modules support](https://ngcpp.github.io/proxy/modules_support). ### Hello World (Stream Version) @@ -131,28 +131,28 @@ Here is a step-by-step explanation: - `#include `: For [`std::string`](https://en.cppreference.com/w/cpp/string/basic_string). - `#include `: For the "Proxy" library. - `struct Streamable : pro::facade_builder ... ::build {}`: Defines a facade type `Streamable`. Specifically, - - [`pro::facade_builder`](https://microsoft.github.io/proxy/spec/basic_facade_builder): Gets prepared to build another facade. - - [`add_convention`](https://microsoft.github.io/proxy/spec/basic_facade_builder/add_convention): Adds a generalized "calling convention", defined by a "dispatch" and several "overloads", to the build context. - - [`pro::operator_dispatch`](https://microsoft.github.io/proxy/spec/operator_dispatch)`<"<<", true>`: Specifies a dispatch for operator `<<` expressions where the primary operand (`proxy`) is on the right-hand side (specified by the second template parameter `true`). Note that polymorphism in the "Proxy" library is defined by expressions rather than member functions, which is different from C++ virtual functions or other OOP languages. + - [`pro::facade_builder`](https://ngcpp.github.io/proxy/spec/basic_facade_builder): Gets prepared to build another facade. + - [`add_convention`](https://ngcpp.github.io/proxy/spec/basic_facade_builder/add_convention): Adds a generalized "calling convention", defined by a "dispatch" and several "overloads", to the build context. + - [`pro::operator_dispatch`](https://ngcpp.github.io/proxy/spec/operator_dispatch)`<"<<", true>`: Specifies a dispatch for operator `<<` expressions where the primary operand (`proxy`) is on the right-hand side (specified by the second template parameter `true`). Note that polymorphism in the "Proxy" library is defined by expressions rather than member functions, which is different from C++ virtual functions or other OOP languages. - `std::ostream&(std::ostream& out) const`: The signature of the calling convention, similar with [`std::move_only_function`](https://en.cppreference.com/w/cpp/utility/functional/move_only_function). `const` specifies that the primary operand is `const`. - - [`build`](https://microsoft.github.io/proxy/spec/basic_facade_builder/build): Builds the context into a facade type. + - [`build`](https://ngcpp.github.io/proxy/spec/basic_facade_builder/build): Builds the context into a facade type. -- [`pro::proxy`](https://microsoft.github.io/proxy/spec/proxy)` p1 = &str`: Creates a `proxy` object from a raw pointer of `std::string`. +- [`pro::proxy`](https://ngcpp.github.io/proxy/spec/proxy)` p1 = &str`: Creates a `proxy` object from a raw pointer of `std::string`. - `std::cout << *p1`: It prints "Hello World" because the calling convention is defined in the facade `Streamable`, so it works as if by calling `std::cout << str`. -- [`pro::proxy`](https://microsoft.github.io/proxy/spec/proxy)` p2 = `[`std::make_unique`](https://en.cppreference.com/w/cpp/memory/unique_ptr/make_unique)`(123)`: Creates a [`std::unique_ptr`](https://en.cppreference.com/w/cpp/memory/unique_ptr)`` and converts to a `proxy`. +- [`pro::proxy`](https://ngcpp.github.io/proxy/spec/proxy)` p2 = `[`std::make_unique`](https://en.cppreference.com/w/cpp/memory/unique_ptr/make_unique)`(123)`: Creates a [`std::unique_ptr`](https://en.cppreference.com/w/cpp/memory/unique_ptr)`` and converts to a `proxy`. - `std::cout << *p2`: Prints "123" with no surprises. -- [`pro::proxy`](https://microsoft.github.io/proxy/spec/proxy)` p3 = `[`pro::make_proxy`](https://microsoft.github.io/proxy/spec/make_proxy)`(3.14)`: Creates a `proxy` from a `double`. +- [`pro::proxy`](https://ngcpp.github.io/proxy/spec/proxy)` p3 = `[`pro::make_proxy`](https://ngcpp.github.io/proxy/spec/make_proxy)`(3.14)`: Creates a `proxy` from a `double`. - `std::cout << std::fixed << std::setprecision(2) << *p3;`: Prints "3.14" with no surprises. ### More Expressions In addition to the operator expressions demonstrated in the previous examples, the library supports almost all forms of expressions in C++ and can make them polymorphic. Specifically, -- [macro `PRO_DEF_MEM_DISPATCH`](https://microsoft.github.io/proxy/spec/PRO_DEF_MEM_DISPATCH): Defines a dispatch type for member function call expressions, providing accessibility as member functions. -- [macro `PRO_DEF_FREE_DISPATCH`](https://microsoft.github.io/proxy/spec/PRO_DEF_FREE_DISPATCH): Defines a dispatch type for free function call expressions, providing accessibility as free functions. -- [macro `PRO_DEF_FREE_AS_MEM_DISPATCH`](https://microsoft.github.io/proxy/spec/PRO_DEF_FREE_AS_MEM_DISPATCH): Defines a dispatch type for free function call expressions, providing accessibility as member functions. -- [class template `pro::operator_dispatch`](https://microsoft.github.io/proxy/spec/operator_dispatch): Dispatch type for operator expressions. -- [class `explicit_conversion_dispatch` (aka. `conversion_dispatch`)](https://microsoft.github.io/proxy/spec/explicit_conversion_dispatch) and [class `implicit_conversion_dispatch`](https://microsoft.github.io/proxy/spec/implicit_conversion_dispatch): Dispatch type for conversion expressions. +- [macro `PRO_DEF_MEM_DISPATCH`](https://ngcpp.github.io/proxy/spec/PRO_DEF_MEM_DISPATCH): Defines a dispatch type for member function call expressions, providing accessibility as member functions. +- [macro `PRO_DEF_FREE_DISPATCH`](https://ngcpp.github.io/proxy/spec/PRO_DEF_FREE_DISPATCH): Defines a dispatch type for free function call expressions, providing accessibility as free functions. +- [macro `PRO_DEF_FREE_AS_MEM_DISPATCH`](https://ngcpp.github.io/proxy/spec/PRO_DEF_FREE_AS_MEM_DISPATCH): Defines a dispatch type for free function call expressions, providing accessibility as member functions. +- [class template `pro::operator_dispatch`](https://ngcpp.github.io/proxy/spec/operator_dispatch): Dispatch type for operator expressions. +- [class `explicit_conversion_dispatch` (aka. `conversion_dispatch`)](https://ngcpp.github.io/proxy/spec/explicit_conversion_dispatch) and [class `implicit_conversion_dispatch`](https://ngcpp.github.io/proxy/spec/implicit_conversion_dispatch): Dispatch type for conversion expressions. Note that some facilities are provided as macro, because C++ templates today do not support generating a function with an arbitrary name. Here is another example that makes member function call expressions polymorphic ([run](https://godbolt.org/z/E95nY7PYq)): @@ -206,11 +206,11 @@ Here is a step-by-step explanation: - `#include `: For [`std::cout`](https://en.cppreference.com/w/cpp/io/cout). - `#include `: For [`std::stringstream`](https://en.cppreference.com/w/cpp/io/basic_stringstream). - `#include `: For the "Proxy" library. -- [`PRO_DEF_MEM_DISPATCH`](https://microsoft.github.io/proxy/spec/PRO_DEF_MEM_DISPATCH)`(MemDraw, Draw)`: Defines a dispatch type `MemDraw` for expressions of calling member function `Draw`. -- [`PRO_DEF_MEM_DISPATCH`](https://microsoft.github.io/proxy/spec/PRO_DEF_MEM_DISPATCH)`(MemArea, Area)`: Defines a dispatch type `MemArea` for expressions of calling member function `Area`. +- [`PRO_DEF_MEM_DISPATCH`](https://ngcpp.github.io/proxy/spec/PRO_DEF_MEM_DISPATCH)`(MemDraw, Draw)`: Defines a dispatch type `MemDraw` for expressions of calling member function `Draw`. +- [`PRO_DEF_MEM_DISPATCH`](https://ngcpp.github.io/proxy/spec/PRO_DEF_MEM_DISPATCH)`(MemArea, Area)`: Defines a dispatch type `MemArea` for expressions of calling member function `Area`. - `struct Drawable : pro::facade_builder ... ::build {}`: Defines a facade type `Drawable`. Specifically, - - [`add_convention`](https://microsoft.github.io/proxy/spec/basic_facade_builder/add_convention): Adds calling conventions to the build context. - - [`support_copy`](https://microsoft.github.io/proxy/spec/basic_facade_builder/support_copy)`<`[`pro::constraint_level`](https://microsoft.github.io/proxy/spec/constraint_level)`::nontrivial>`: Specifies the underlying pointer type shall be copyable, which also makes the resulting `proxy` type copyable. + - [`add_convention`](https://ngcpp.github.io/proxy/spec/basic_facade_builder/add_convention): Adds calling conventions to the build context. + - [`support_copy`](https://ngcpp.github.io/proxy/spec/basic_facade_builder/support_copy)`<`[`pro::constraint_level`](https://ngcpp.github.io/proxy/spec/constraint_level)`::nontrivial>`: Specifies the underlying pointer type shall be copyable, which also makes the resulting `proxy` type copyable. - `class Rectangle`: An implementation of `Drawable`. - Function `PrintDrawableToString`: Converts a `Drawable` into a `std::string`. Note that this is a function rather than a function template, which means it can generate [ABI](https://en.wikipedia.org/wiki/Application_binary_interface) in a larger build system. - `pro::proxy p = pro::make_proxy(3, 5)`: Creates a `proxy` object containing a `Rectangle`. @@ -219,18 +219,18 @@ Here is a step-by-step explanation: ### Other Useful Features -The "Proxy" library is a self-contained solution for runtime polymorphism in C++. There are many other capabilities documented in the [specifications](https://microsoft.github.io/proxy/spec). In addition to the features mentioned above, here is a curated list of the most popular features based on user feedback: +The "Proxy" library is a self-contained solution for runtime polymorphism in C++. There are many other capabilities documented in the [specifications](https://ngcpp.github.io/proxy/spec). In addition to the features mentioned above, here is a curated list of the most popular features based on user feedback: -- **Overloading**: [`facade_builder::add_convention`](https://microsoft.github.io/proxy/spec/basic_facade_builder/add_convention) is more powerful than demonstrated above. It can take any number of overload types (formally, any type meeting the [*ProOverload* requirements](https://microsoft.github.io/proxy/spec/ProOverload)) and perform standard overload resolution when invoking a `proxy`. -- **Facade composition**: [`facade_builder::add_facade`](https://microsoft.github.io/proxy/spec/basic_facade_builder/add_facade) allows flexible composition of different abstractions. -- **Concepts**: To facilitate template programming with "Proxy", 3 concepts are exported from a facade type. Namely, [`proxiable`](https://microsoft.github.io/proxy/spec/proxiable), [`proxiable_target`](https://microsoft.github.io/proxy/spec/proxiable_target) and [`inplace_proxiable_target`](https://microsoft.github.io/proxy/spec/inplace_proxiable_target). -- **Allocator awareness**: [function template `allocate_proxy`](https://microsoft.github.io/proxy/spec/allocate_proxy) is able to create a `proxy` from a value with any custom allocator. In C++11, [`std::function`](https://en.cppreference.com/w/cpp/utility/functional/function) and [`std::packaged_task`](https://en.cppreference.com/w/cpp/thread/packaged_task) had constructors that accepted custom allocators for performance tuning, but these were [removed in C++17](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0302r1.html) because "the semantics are unclear, and there are technical issues with storing an allocator in a type-erased context and then recovering that allocator later for any allocations needed during copy assignment". These issues do not apply to `allocate_proxy`. -- **Configurable constraints**: [`facade_builder`](https://microsoft.github.io/proxy/spec/basic_facade_builder) provides full support for constraints configuration, including memory layout (by [`restrict_layout`](https://microsoft.github.io/proxy/spec/basic_facade_builder/restrict_layout)), copyability (by [`support_copy`](https://microsoft.github.io/proxy/spec/basic_facade_builder/support_copy)), relocatability (by [`support_relocation`](https://microsoft.github.io/proxy/spec/basic_facade_builder/support_relocation)), and destructibility (by [`support_destruction`](https://microsoft.github.io/proxy/spec/basic_facade_builder/support_destruction)). -- **Reflection**: `proxy` supports type-based compile-time reflection for runtime queries. Please refer to [`facade_builder::add_reflection`](https://microsoft.github.io/proxy/spec/basic_facade_builder/add_reflection) and [function template `proxy_reflect`](https://microsoft.github.io/proxy/spec/proxy_reflect) for more details. -- **Non-owning proxy**: Although `proxy` can manage the lifetime of an object effectively, similar to a smart pointer, we sometimes want to dereference it before passing to a non-owning context. This has been implemented as an extension since 3.2.0. Please refer to [function template `make_proxy_view`](https://microsoft.github.io/proxy/spec/make_proxy_view), [alias template `proxy_view`, class template `observer_facade`](https://microsoft.github.io/proxy/spec/proxy_view) and [`skills::as_view`](https://microsoft.github.io/proxy/spec/skills_as_view) for more details. -- **RTTI**: [RTTI (run-time type information)](https://en.wikipedia.org/wiki/Run-time_type_information) provides "weak" reflection capability in C++ since the last century. Although it is not as powerful as reflection in some other languages (like `Object.GetType()` in C# or `Object.getClass()` in Java), it offers the basic infrastructure for type-safe casting at runtime. Since 4.0.0, "RTTI for `proxy`" has been implemented as an extension and allows users to opt-in for each facade definition. Please refer to [`skills::rtti`](https://microsoft.github.io/proxy/spec/skills_rtti) for more details. -- **Shared and weak ownership**: Although `proxy` can be created from a [`std::shared_ptr`](https://en.cppreference.com/w/cpp/memory/shared_ptr), extensions are available to create `proxy` objects with shared and weak ownership in a more efficient way since 3.3.0. Please refer to [function template `make_proxy_shared`](https://microsoft.github.io/proxy/spec/make_proxy_shared), [`allocate_proxy_shared`](https://microsoft.github.io/proxy/spec/allocate_proxy_shared), [alias template `weak_proxy`, class template `weak_facade`](https://microsoft.github.io/proxy/spec/weak_proxy) and [`skills::as_weak`](https://microsoft.github.io/proxy/spec/skills_as_weak) for more details. -- **Weak dispatch**: When an object does not implement a convention, and we do not want it to trigger a hard compile error, it is allowed to specify a [`weak_dispatch`](https://microsoft.github.io/proxy/spec/weak_dispatch) that throws when invoked. +- **Overloading**: [`facade_builder::add_convention`](https://ngcpp.github.io/proxy/spec/basic_facade_builder/add_convention) is more powerful than demonstrated above. It can take any number of overload types (formally, any type meeting the [*ProOverload* requirements](https://ngcpp.github.io/proxy/spec/ProOverload)) and perform standard overload resolution when invoking a `proxy`. +- **Facade composition**: [`facade_builder::add_facade`](https://ngcpp.github.io/proxy/spec/basic_facade_builder/add_facade) allows flexible composition of different abstractions. +- **Concepts**: To facilitate template programming with "Proxy", 3 concepts are exported from a facade type. Namely, [`proxiable`](https://ngcpp.github.io/proxy/spec/proxiable), [`proxiable_target`](https://ngcpp.github.io/proxy/spec/proxiable_target) and [`inplace_proxiable_target`](https://ngcpp.github.io/proxy/spec/inplace_proxiable_target). +- **Allocator awareness**: [function template `allocate_proxy`](https://ngcpp.github.io/proxy/spec/allocate_proxy) is able to create a `proxy` from a value with any custom allocator. In C++11, [`std::function`](https://en.cppreference.com/w/cpp/utility/functional/function) and [`std::packaged_task`](https://en.cppreference.com/w/cpp/thread/packaged_task) had constructors that accepted custom allocators for performance tuning, but these were [removed in C++17](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0302r1.html) because "the semantics are unclear, and there are technical issues with storing an allocator in a type-erased context and then recovering that allocator later for any allocations needed during copy assignment". These issues do not apply to `allocate_proxy`. +- **Configurable constraints**: [`facade_builder`](https://ngcpp.github.io/proxy/spec/basic_facade_builder) provides full support for constraints configuration, including memory layout (by [`restrict_layout`](https://ngcpp.github.io/proxy/spec/basic_facade_builder/restrict_layout)), copyability (by [`support_copy`](https://ngcpp.github.io/proxy/spec/basic_facade_builder/support_copy)), relocatability (by [`support_relocation`](https://ngcpp.github.io/proxy/spec/basic_facade_builder/support_relocation)), and destructibility (by [`support_destruction`](https://ngcpp.github.io/proxy/spec/basic_facade_builder/support_destruction)). +- **Reflection**: `proxy` supports type-based compile-time reflection for runtime queries. Please refer to [`facade_builder::add_reflection`](https://ngcpp.github.io/proxy/spec/basic_facade_builder/add_reflection) and [function template `proxy_reflect`](https://ngcpp.github.io/proxy/spec/proxy_reflect) for more details. +- **Non-owning proxy**: Although `proxy` can manage the lifetime of an object effectively, similar to a smart pointer, we sometimes want to dereference it before passing to a non-owning context. This has been implemented as an extension since 3.2.0. Please refer to [function template `make_proxy_view`](https://ngcpp.github.io/proxy/spec/make_proxy_view), [alias template `proxy_view`, class template `observer_facade`](https://ngcpp.github.io/proxy/spec/proxy_view) and [`skills::as_view`](https://ngcpp.github.io/proxy/spec/skills_as_view) for more details. +- **RTTI**: [RTTI (run-time type information)](https://en.wikipedia.org/wiki/Run-time_type_information) provides "weak" reflection capability in C++ since the last century. Although it is not as powerful as reflection in some other languages (like `Object.GetType()` in C# or `Object.getClass()` in Java), it offers the basic infrastructure for type-safe casting at runtime. Since 4.0.0, "RTTI for `proxy`" has been implemented as an extension and allows users to opt-in for each facade definition. Please refer to [`skills::rtti`](https://ngcpp.github.io/proxy/spec/skills_rtti) for more details. +- **Shared and weak ownership**: Although `proxy` can be created from a [`std::shared_ptr`](https://en.cppreference.com/w/cpp/memory/shared_ptr), extensions are available to create `proxy` objects with shared and weak ownership in a more efficient way since 3.3.0. Please refer to [function template `make_proxy_shared`](https://ngcpp.github.io/proxy/spec/make_proxy_shared), [`allocate_proxy_shared`](https://ngcpp.github.io/proxy/spec/allocate_proxy_shared), [alias template `weak_proxy`, class template `weak_facade`](https://ngcpp.github.io/proxy/spec/weak_proxy) and [`skills::as_weak`](https://ngcpp.github.io/proxy/spec/skills_as_weak) for more details. +- **Weak dispatch**: When an object does not implement a convention, and we do not want it to trigger a hard compile error, it is allowed to specify a [`weak_dispatch`](https://ngcpp.github.io/proxy/spec/weak_dispatch) that throws when invoked. ## Minimum Requirements for Compilers @@ -245,7 +245,7 @@ The "Proxy" library is a self-contained solution for runtime polymorphism in C++ ## Build and Run Tests with CMake ``` -git clone https://github.com/microsoft/proxy.git +git clone https://github.com/ngcpp/proxy.git cd proxy cmake -B build cmake --build build -j @@ -264,22 +264,10 @@ ctest --test-dir build -j ## Contributing -This project welcomes contributions and suggestions. Most contributions require you to agree to a +This project welcomes contributions and suggestions. Some contributions may require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us -the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com. +the rights to use your contribution. If a CLA is required, the PR bot will provide instructions. -When you submit a pull request, a CLA bot will automatically determine whether you need to provide -a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions -provided by the bot. You will only need to do this once across all repos using our CLA. - -This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). -For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or -contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. - -## Trademarks - -This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft -trademarks or logos is subject to and must follow -[Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general). -Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. -Any use of third-party trademarks or logos are subject to those third-party's policies. +This project has adopted the [Contributor Covenant Code of Conduct](https://www.contributor-covenant.org/version/2/1/code_of_conduct/). +For more information see the [Contributor Covenant FAQ](https://www.contributor-covenant.org/faq/) or +contact [conduct@ngcpp.org](mailto:conduct@ngcpp.org) with any additional questions or comments. diff --git a/SECURITY.md b/SECURITY.md index 869fdfe..bc82d67 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,41 +1,25 @@ - - ## Security -Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). - -If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below. +The Next Gen C++ Foundation (ngcpp) takes security seriously. If you believe you have found a security vulnerability in this repository, please report it responsibly. ## Reporting Security Issues **Please do not report security vulnerabilities through public GitHub issues.** -Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report). - -If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey). - -You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc). - -Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: - - * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) - * Full paths of source file(s) related to the manifestation of the issue - * The location of the affected source code (tag/branch/commit or direct URL) - * Any special configuration required to reproduce the issue - * Step-by-step instructions to reproduce the issue - * Proof-of-concept or exploit code (if possible) - * Impact of the issue, including how an attacker might exploit the issue - -This information will help us triage your report more quickly. +Instead, please create a private security advisory at: -If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs. +- https://github.com/ngcpp/proxy/security/advisories/new -## Preferred Languages +If you need to share additional details that do not fit in the advisory, you may email: -We prefer all communications to be in English. +- ngcpp@outlook.com -## Policy +Please include as much of the following as possible to help us triage quickly: -Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd). +- Type of issue (e.g., buffer overflow, RCE, etc.) +- Affected file paths and versions/commits +- Reproduction steps and any required configuration +- Proof-of-concept (if available) +- Impact assessment - +We aim to acknowledge reports within 72 hours. diff --git a/SUPPORT.md b/SUPPORT.md index 291d4d4..50dfa90 100644 --- a/SUPPORT.md +++ b/SUPPORT.md @@ -1,25 +1,16 @@ -# TODO: The maintainer of this repo has not yet edited this file - -**REPO OWNER**: Do you want Customer Service & Support (CSS) support for this product/project? - -- **No CSS support:** Fill out this template with information about how to file issues and get help. -- **Yes CSS support:** Fill out an intake form at [aka.ms/onboardsupport](https://aka.ms/onboardsupport). CSS will work with/help you to determine next steps. -- **Not sure?** Fill out an intake as though the answer were "Yes". CSS will help you decide. - -*Then remove this first heading from this SUPPORT.MD file before publishing your repo.* - # Support ## How to file issues and get help -This project uses GitHub Issues to track bugs and feature requests. Please search the existing -issues before filing new issues to avoid duplicates. For new issues, file your bug or -feature request as a new Issue. +This project uses GitHub Issues to track bugs and feature requests. Please search the existing +issues before filing new ones to avoid duplicates. For new issues, file your bug or feature request +as a new issue. + +For help and questions about using this project, please use GitHub Discussions: -For help and questions about using this project, please **REPO MAINTAINER: INSERT INSTRUCTIONS HERE -FOR HOW TO ENGAGE REPO OWNERS OR COMMUNITY FOR HELP. COULD BE A STACK OVERFLOW TAG OR OTHER -CHANNEL. WHERE WILL YOU HELP PEOPLE?**. +- https://github.com/ngcpp/proxy/discussions -## Microsoft Support Policy +## Support Policy -Support for this **PROJECT or PRODUCT** is limited to the resources listed above. +Support for this project is provided on a best-effort basis by the community and maintainers via +the resources listed above. diff --git a/benchmarks/proxy_creation_benchmark.cpp b/benchmarks/proxy_creation_benchmark.cpp index a17a4e4..11d8b29 100644 --- a/benchmarks/proxy_creation_benchmark.cpp +++ b/benchmarks/proxy_creation_benchmark.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) 2022-2026 Microsoft Corporation. // Licensed under the MIT License. #include diff --git a/benchmarks/proxy_operation_benchmark.cpp b/benchmarks/proxy_operation_benchmark.cpp index 978d58f..dbb3053 100644 --- a/benchmarks/proxy_operation_benchmark.cpp +++ b/benchmarks/proxy_operation_benchmark.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) 2022-2026 Microsoft Corporation. // Licensed under the MIT License. #include diff --git a/benchmarks/proxy_operation_benchmark_context.cpp b/benchmarks/proxy_operation_benchmark_context.cpp index d0523a1..fedcef6 100644 --- a/benchmarks/proxy_operation_benchmark_context.cpp +++ b/benchmarks/proxy_operation_benchmark_context.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) 2022-2026 Microsoft Corporation. // Licensed under the MIT License. #include "proxy_operation_benchmark_context.h" diff --git a/benchmarks/proxy_operation_benchmark_context.h b/benchmarks/proxy_operation_benchmark_context.h index 27a3346..53bf0f1 100644 --- a/benchmarks/proxy_operation_benchmark_context.h +++ b/benchmarks/proxy_operation_benchmark_context.h @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) 2022-2026 Microsoft Corporation. // Licensed under the MIT License. #include diff --git a/docs/faq.md b/docs/faq.md index e08ec82..5d48888 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -21,7 +21,7 @@ ### Why is "Proxy" so popular? -"Proxy" is built by engineers at Microsoft and initially deployed in the Windows operating system. For 40 years, the inheritance-based polymorphism paradigm has been the only scalable solution for runtime polymorphism in C++. However, a "virtual function" is no longer the optimal choice for runtime polymorphism today, and new languages with better paradigms, like [traits in Rust](https://doc.rust-lang.org/book/ch10-02-traits.html), are emerging. "Proxy" is our latest and greatest solution for generic runtime polymorphism in C++. It is easy to integrate and makes C++ feel like a brand new language when dealing with runtime abstractions. +"Proxy" was created by Microsoft engineers and incubated at Microsoft from 2018 to Feb 2026, has been used in the Windows operating system since 2022. It is now maintained by the Next Gen C++ Foundation (ngcpp). For 40 years, the inheritance-based polymorphism paradigm has been the only scalable solution for runtime polymorphism in C++. However, a "virtual function" is no longer the optimal choice for runtime polymorphism today, and new languages with better paradigms, like [traits in Rust](https://doc.rust-lang.org/book/ch10-02-traits.html), are emerging. "Proxy" is our latest and greatest solution for generic runtime polymorphism in C++. It is easy to integrate and makes C++ feel like a brand new language when dealing with runtime abstractions. ### Who is "Proxy" for? @@ -37,7 +37,7 @@ The fundamental abstraction of "Proxy" is called "facade". It is recommended for ### How to integrate "Proxy" into my project? -Since "Proxy" is a header-only library, you can simply navigate to the [latest release](https://github.com/microsoft/proxy/releases), download the source code, and include "proxy.h" in your project. Make sure your compiler version meets the [minimum requirements for compilers](README.md#minimum-requirements-for-compilers). If your project has already integrated with [vcpkg](https://vcpkg.io/) or [conan](https://conan.io/), just search for the keyword "proxy" and install it. Thanks to the community that helped port "Proxy" to these platforms! +Since "Proxy" is a header-only library, you can simply navigate to the [latest release](https://github.com/ngcpp/proxy/releases), download the source code, and include "proxy.h" in your project. Make sure your compiler version meets the [minimum requirements for compilers](README.md#minimum-requirements-for-compilers). If your project has already integrated with [vcpkg](https://vcpkg.io/) or [conan](https://conan.io/), just search for the keyword "proxy" and install it. Thanks to the community that helped port "Proxy" to these platforms! ### My existing project uses virtual functions. How should I migrate to "Proxy"? @@ -92,4 +92,4 @@ These rules let old and new code coexist during the transition while keeping ODR ### What should I do if I found this library deficient in my scenario? -Please search for your scenario in the existing issues first, and feel free to file an a new one on demand, following the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). +Please search for your scenario in the existing issues first, and feel free to file an a new one on demand, following the [Contributor Covenant Code of Conduct](https://www.contributor-covenant.org/version/2/1/code_of_conduct/). diff --git a/docs/resources/icon.png b/docs/resources/icon.png index dbfd434..5b2ea19 100644 Binary files a/docs/resources/icon.png and b/docs/resources/icon.png differ diff --git a/include/proxy/proxy.h b/include/proxy/proxy.h index b6eb09e..d840382 100644 --- a/include/proxy/proxy.h +++ b/include/proxy/proxy.h @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) 2022-2026 Microsoft Corporation. // Licensed under the MIT License. #ifndef MSFT_PROXY_PROXY_H_ diff --git a/include/proxy/proxy_fmt.h b/include/proxy/proxy_fmt.h index db6c792..1d3b154 100644 --- a/include/proxy/proxy_fmt.h +++ b/include/proxy/proxy_fmt.h @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) 2022-2026 Microsoft Corporation. // Licensed under the MIT License. #ifndef MSFT_PROXY_PROXY_FMT_H_ diff --git a/include/proxy/proxy_macros.h b/include/proxy/proxy_macros.h index 542ae68..953e7dd 100644 --- a/include/proxy/proxy_macros.h +++ b/include/proxy/proxy_macros.h @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) 2022-2026 Microsoft Corporation. // Licensed under the MIT License. #ifndef MSFT_PROXY_PROXY_MACROS_H_ diff --git a/include/proxy/v4/proxy.h b/include/proxy/v4/proxy.h index dcebcd3..0a6eccc 100644 --- a/include/proxy/v4/proxy.h +++ b/include/proxy/v4/proxy.h @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) 2022-2026 Microsoft Corporation. // Licensed under the MIT License. #ifndef MSFT_PROXY_V4_PROXY_H_ diff --git a/include/proxy/v4/proxy_fmt.h b/include/proxy/v4/proxy_fmt.h index be6a368..5587b8f 100644 --- a/include/proxy/v4/proxy_fmt.h +++ b/include/proxy/v4/proxy_fmt.h @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) 2022-2026 Microsoft Corporation. // Licensed under the MIT License. #ifndef MSFT_PROXY_V4_PROXY_FMT_H_ diff --git a/include/proxy/v4/proxy_macros.h b/include/proxy/v4/proxy_macros.h index 147474a..3590ddf 100644 --- a/include/proxy/v4/proxy_macros.h +++ b/include/proxy/v4/proxy_macros.h @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) 2022-2026 Microsoft Corporation. // Licensed under the MIT License. #ifndef MSFT_PROXY_V4_PROXY_MACROS_H_ diff --git a/meson.build b/meson.build index 24d5a84..d909e1a 100644 --- a/meson.build +++ b/meson.build @@ -79,7 +79,7 @@ if pkgconfig.found() pkgconfig.generate( name: meson.project_name(), description: 'Next Generation Polymorphism in C++', - url: 'https://microsoft.github.io/proxy/', + url: 'https://ngcpp.github.io/proxy/', ) endif diff --git a/mkdocs.yml b/mkdocs.yml index 3923ea9..06eed02 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,9 +1,9 @@ --- site_name: Proxy 4 -site_url: https://microsoft.github.io/proxy +site_url: https://ngcpp.github.io/proxy site_description: Next Generation Polymorphism in C++ -copyright: Copyright (c) Microsoft Corporation -repo_url: https://github.com/microsoft/proxy/ +copyright: Copyright (c) 2022-2026 Microsoft Corporation +repo_url: https://github.com/ngcpp/proxy/ edit_uri: "" theme: diff --git a/mkdocs/overrides/main.html b/mkdocs/overrides/main.html index 5e52e2c..86d8a73 100644 --- a/mkdocs/overrides/main.html +++ b/mkdocs/overrides/main.html @@ -6,6 +6,6 @@ c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)}; t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i; y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y); - })(window, document, "clarity", "script", "roby7oe11n"); + })(window, document, "clarity", "script", "v8vxusocp2"); {% endblock %} diff --git a/tests/proxy_creation_tests.cpp b/tests/proxy_creation_tests.cpp index 8c03e8b..b93727c 100644 --- a/tests/proxy_creation_tests.cpp +++ b/tests/proxy_creation_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) 2022-2026 Microsoft Corporation. // Licensed under the MIT License. #include "utils.h" diff --git a/tests/proxy_dispatch_tests.cpp b/tests/proxy_dispatch_tests.cpp index ca7fc85..0e66170 100644 --- a/tests/proxy_dispatch_tests.cpp +++ b/tests/proxy_dispatch_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) 2022-2026 Microsoft Corporation. // Licensed under the MIT License. #include diff --git a/tests/proxy_fmt_format_tests.cpp b/tests/proxy_fmt_format_tests.cpp index 10e1fb8..7467c23 100644 --- a/tests/proxy_fmt_format_tests.cpp +++ b/tests/proxy_fmt_format_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) 2022-2026 Microsoft Corporation. // Licensed under the MIT License. #include diff --git a/tests/proxy_format_tests.cpp b/tests/proxy_format_tests.cpp index 8947973..4860b25 100644 --- a/tests/proxy_format_tests.cpp +++ b/tests/proxy_format_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) 2022-2026 Microsoft Corporation. // Licensed under the MIT License. #include diff --git a/tests/proxy_integration_tests.cpp b/tests/proxy_integration_tests.cpp index a9a6188..7f2fb6d 100644 --- a/tests/proxy_integration_tests.cpp +++ b/tests/proxy_integration_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) 2022-2026 Microsoft Corporation. // Licensed under the MIT License. #include diff --git a/tests/proxy_invocation_tests.cpp b/tests/proxy_invocation_tests.cpp index 83350e9..5dd57ce 100644 --- a/tests/proxy_invocation_tests.cpp +++ b/tests/proxy_invocation_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) 2022-2026 Microsoft Corporation. // Licensed under the MIT License. #include diff --git a/tests/proxy_lifetime_tests.cpp b/tests/proxy_lifetime_tests.cpp index 0a338a0..91942e8 100644 --- a/tests/proxy_lifetime_tests.cpp +++ b/tests/proxy_lifetime_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) 2022-2026 Microsoft Corporation. // Licensed under the MIT License. #include "utils.h" diff --git a/tests/proxy_reflection_tests.cpp b/tests/proxy_reflection_tests.cpp index 5cc90b4..ecbf6cd 100644 --- a/tests/proxy_reflection_tests.cpp +++ b/tests/proxy_reflection_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) 2022-2026 Microsoft Corporation. // Licensed under the MIT License. #include "utils.h" diff --git a/tests/proxy_regression_tests.cpp b/tests/proxy_regression_tests.cpp index 5ab2aa3..5c21917 100644 --- a/tests/proxy_regression_tests.cpp +++ b/tests/proxy_regression_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) 2022-2026 Microsoft Corporation. // Licensed under the MIT License. #include diff --git a/tests/proxy_rtti_tests.cpp b/tests/proxy_rtti_tests.cpp index 814c832..3965ca2 100644 --- a/tests/proxy_rtti_tests.cpp +++ b/tests/proxy_rtti_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) 2022-2026 Microsoft Corporation. // Licensed under the MIT License. #include diff --git a/tests/proxy_traits_tests.cpp b/tests/proxy_traits_tests.cpp index 8e81a4e..51ef045 100644 --- a/tests/proxy_traits_tests.cpp +++ b/tests/proxy_traits_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) 2022-2026 Microsoft Corporation. // Licensed under the MIT License. #include "utils.h" diff --git a/tests/proxy_view_tests.cpp b/tests/proxy_view_tests.cpp index 97dd1c9..9dbf3c5 100644 --- a/tests/proxy_view_tests.cpp +++ b/tests/proxy_view_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) 2022-2026 Microsoft Corporation. // Licensed under the MIT License. #include "utils.h" diff --git a/tests/utils.h b/tests/utils.h index f1835d2..8ad7fac 100644 --- a/tests/utils.h +++ b/tests/utils.h @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) 2022-2026 Microsoft Corporation. // Licensed under the MIT License. #ifndef _MSFT_PROXY_TEST_UTILS_ diff --git a/tools/report_generator/main.cpp b/tools/report_generator/main.cpp index 3a0043a..9e47a46 100644 --- a/tools/report_generator/main.cpp +++ b/tools/report_generator/main.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) 2022-2026 Microsoft Corporation. // Licensed under the MIT License. #include