Improve facade infrastructure #102
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
overload_typesfrom "Dispatch" and added new named requirements of "Convention". The tables below summarizes each dimension of "Facade":convention_types:tuple-likecollection of Conventionreflection_types:
tuple-likecollection of Reflectionconstraints:pro::proxiable_ptr_constraintsdispatch_type: Dispatchoverload_types:tuple-likecollection of overload signaturesnoexceptconstructor: Creation of a Dispatch, encouraged to be trivialoperator()of arbitrary typeT&and arguments: Invoke with lvalue reference of typeT[Optional]
operator()of arbitrary typeconst P&and arguments: Invoke with the underlying pointer type[Optional]
operator()ofstd::nullptr_tand arguments: Default invocation behavioraccessor<P>: Accessor of a proxy typeconstexprconstructor of typestd::in_place_type_t<P>, wherePis an underlying pointer typeproxythat can inject more APIs to improve syntaxnoexceptconstructor: Creation of an Accessor, encouraged to be trivialPRO_DEF_MEMBER_DISPATCHintoPRO_DEF_MEM_DISPATCH(and the_WITH_DEFAULTversion) and removed overload types from the macro.PRO_DEF_FREE_DISPATCH(and the_WITH_DEFAULTversion).PRO_MAKE_DISPATCH_PACK(),PRO_DEF_FACADEand the 3 instantiations ofpro::proxiable_ptr_constraintswith a builder typepro::facade_builderimplemented with pure template metaprogramming. The new syntax to define a facade is as follows:pro::details::dependent_tand exposed aspro::lazy_eval_tandpro::lazy_eval()to facilitate definition of a custom dispatch.