diff --git a/doc/callable_traits.qbk b/doc/callable_traits.qbk index 5064b50..70c27fc 100644 --- a/doc/callable_traits.qbk +++ b/doc/callable_traits.qbk @@ -13,20 +13,12 @@ [lang en] ] - - [/ developer: you should enable word wrap before you read further] - - - [template libname[][^CallableTraits]] [template lib_namespace[][^callable_traits]] [template namespace_scoped[][^callable_traits::]] [template header_include_prefix[]callable_traits/] -[template detail_open_include[] `#include<`[^[header_include_prefix]]] -[template detail_close_include[]`.hpp>`] -[template include_header[name][detail_open_include][^[name]][detail_close_include]] [template invoke[][@http://en.cppreference.com/w/cpp/utility/functional/invoke [^['INVOKE]]]] [template hana[][@https://boostorg.github.io/hana/ [^Boost.Hana]]] [template feedback[][link callable_traits.contact feedback]] @@ -36,48 +28,10 @@ [template abominable_paper[][@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0172r0.html "abominable" function types]] [template link_compatibility[][link callable_traits.compatibility Compatibility]] [template link_compatibility_issues[][link callable_traits.compatibility.compatibility_issues Compatibility Issues]] -[template function_types_link[][@http://www.boost.org/doc/libs/1_60_0/libs/function_types/doc/html/index.html [^Boost.FunctionTypes]]] +[template function_types_link[][@http://www.boost.org/doc/libs/1_61_0/libs/function_types/doc/html/index.html [^Boost.FunctionTypes]]] [template function_types[][^Boost.FunctionTypes]] -[/ *** these templates are used to turn concept names green ***] -[template concept_fn_ptr[][role green FunctionPtr]] -[template concept_fn_ref[][role green FunctionReference]] -[template concept_simple_fn[][role green UnqualifiedFunction]] -[template concept_abominable[][role green AbominableFunction]] -[template concept_fn[][role green Function]] -[template concept_pmf[][role green MemberFunctionPtr]] -[template concept_pmd[][role green MemberDataPtr]] -[template concept_member_ptr[][role green MemberPtr]] -[template concept_simple_fn_obj[][role green SimpleFunctionObject]] -[template concept_overloaded_fn_obj[][role green OverloadedFunctionObject]] -[template concept_fn_obj[][role green FunctionObject]] -[template concept_simple_callable[][role green SimpleCallable]] -[template concept_simple_invokable[][role green SimpleInvokable]] -[template concept_callable[][role green Callable]] -[template concept_invokable[][role green Invokable]] -[template concept_signature[][role green Signature]] -[template concept_cc_tag[][role green CallingConventionTag]] - -[/ *** concept links *** ] -[template link_fn_ptr[][link callable_traits.glossary.ref_fn_ptr [concept_fn_ptr]]] -[template link_fn_ref[][link callable_traits.glossary.ref_fn_ref [concept_fn_ref]]] -[template link_simple_fn[][link callable_traits.glossary.ref_simple_fn [concept_simple_fn]]] -[template link_abominable[][link callable_traits.glossary.ref_abominable [concept_abominable]]] -[template link_fn[][link callable_traits.glossary.ref_fn [concept_fn]]] -[template link_pmf[][link callable_traits.glossary.ref_pmf [concept_pmf]]] -[template link_pmd[][link callable_traits.glossary.ref_pmd [concept_pmd]]] -[template link_member_ptr[][link callable_traits.glossary.ref_member_ptr [concept_member_ptr]]] -[template link_simple_fn_obj[][link callable_traits.glossary.ref_simple_fn_obj [concept_simple_fn_obj]]] -[template link_overloaded_fn_obj[][link callable_traits.glossary.ref_overloaded_fn_obj [concept_overloaded_fn_obj]]] -[template link_fn_obj[][link callable_traits.glossary.ref_fn_obj [concept_fn_obj]]] -[template link_simple_callable[][link callable_traits.glossary.ref_simple_callable [concept_simple_callable]]] -[template link_simple_invokable[][link callable_traits.glossary.ref_simple_invokable [concept_simple_invokable]]] -[template link_callable[][link callable_traits.glossary.ref_callable [concept_callable]]] -[template link_invokable[][link callable_traits.glossary.ref_invokable [concept_invokable]]] -[template link_signature[][link callable_traits.glossary.ref_signature [concept_signature]]] -[template link_cc_tag[][link callable_traits.glossary.ref_cc_tag [concept_cc_tag]]] - -[/ *** reference links *** ] +[/ *** reference links *** [template link_add_calling_convention[][link callable_traits.ref_add_calling_convention [^add_calling_convention]]] [template link_add_member_const[][link callable_traits.ref_add_member_const [^add_member_const]]] [template link_add_member_cv[][link callable_traits.ref_add_member_cv [^add_member_cv]]] @@ -110,37 +64,14 @@ [template link_remove_member_reference[][link callable_traits.ref_remove_member_reference [^remove_member_reference]]] [template link_remove_varargs[][link callable_traits.ref_remove_varargs [^remove_varargs]]] [template link_remove_member_volatile[][link callable_traits.ref_remove_member_volatile [^remove_member_volatile]]] -[template link_push_back[][link callable_traits.ref_push_back [^push_back]]] -[template link_push_front[][link callable_traits.ref_push_front [^push_front]]] -[template link_pop_back[][link callable_traits.ref_pop_back [^pop_back]]] -[template link_pop_front[][link callable_traits.ref_pop_front [^pop_front]]] +[template link_push_back_args[][link callable_traits.ref_push_back_args [^push_back_args]]] +[template link_push_front_args[][link callable_traits.ref_push_front_args [^push_front_args]]] +[template link_pop_back_args[][link callable_traits.ref_pop_back_args [^pop_back_args]]] +[template link_pop_front_args[][link callable_traits.ref_pop_front_args [^pop_front_args]]] [template link_insert_args[][link callable_traits.ref_insert_args [^insert_args]]] [template link_remove_args[][link callable_traits.ref_remove_args [^remove_args]]] [template link_replace_args[][link callable_traits.ref_replace_args [^replace_args]]] [template link_result_of[][link callable_traits.ref_result_of [^result_of]]] - -[template cc_warning_rationale[] -The rationale for classifying the calling convention features as "experimental" is three-fold: - -# Calling conventions are, by definition, highly platform-specific. -# Each calling convention effectively doubles the test surface of [libname] on every supported platform. Tests have not yet been written to account for this. -# The author's knowledge of cross-platform behavior of calling conventions in C++ is limited. - -It is the author's hope that future versions of [libname] will offer a stable, thoroughly-tested, and well-documented implementation of these features. If you have experience in this domain, please [link_contact_the_author]. -] - -[template cc_warning_full[] -[warning Features for the manipulation and inspection of calling conventions are optional, which must be enabled with macro definitions. The features regarding them are currently classified as ['experimental], and are subject to breaking changes in future versions of [libname]. - -[cc_warning_rationale] -] -] - -[template cc_warning_brief[] -[warning Features for calling conventions are currently classified as ['experimental], and are subject to breaking changes in future versions of [libname]. - -[cc_warning_rationale] -] ] [section:introduction Overview] @@ -148,13 +79,12 @@ It is the author's hope that future versions of [libname] will offer a stable, t [import ../example/overview.cpp] [overview] -[libname] is a C++11/14/17 header-only library for the inspection, synthesis, and decomposition of callable types. Whether it's calling conventions, `const volatile &&`, or container-like manipulation of parameter lists, [libname] provides all the tools you need to *completely rid your codebase of function type specializations*. While not for everyone, [libname] offers a comprehensive, fine-grained assortment of traits and metafunctions for building and ripping apart C++'s most complicated and obscure types with ease. [libname] fills the gaps where existing library solutions fall short, aiming to be the "complete type manipulation facility for function types" mentioned in the last section of [@http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2015/p0172r0.html p0172], the C++17 proposal regarding "abominable function types". [libname] currently supports GCC 4.8 and later, Clang 3.5 and later, AppleClang from XCode 6.3 and later, and MSVC 19. -[libname] is header-only, and does not depend on any non-standard headers. +[libname] is a C++11/14/17 header-only library for the inspection, synthesis, and decomposition of callable types. Whether it's calling conventions, `const volatile &&`, or container-like manipulation of parameter lists, [libname] provides all the tools you need to *completely rid your codebase of function type specializations*. While not for everyone, [libname] offers a comprehensive, fine-grained assortment of traits and metafunctions for building and ripping apart C++'s most complicated and obscure types with ease. [libname] fills the gaps where existing library solutions fall short, aiming to be the "complete type manipulation facility for function types" mentioned in the last section of [@http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2015/p0172r0.html p0172], the C++17 proposal regarding "abominable function types". [libname] currently supports GCC 4.8 and later, Clang 3.5 and later, AppleClang from XCode 6.3 and later, and Visual Studio 2015. + +[libname] is header-only, and does not depend on any headers outside the standard library. [libname] is currently hosted at [repo]. [*[libname] is not a Boost library.] -[note A few features are disabled for older/non-compliant compilers. See the [link_compatibility_issues] section for more details. ] - [section:prereqs Prerequisite Topics] This documentation will be most beneficial to readers who posess a basic understanding of the following C++ features: @@ -195,10 +125,6 @@ Template specializations like those in the code snippet above ['still] do not ac [note The upcoming ISO standard for C++17 includes a [@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0012r1.html change to the core language] which adds the [^noexcept] qualifier to the type system. If the author's understanding is correct, this would increase the the count of necessary template specializations to [role red[*96]] ([unsure]). Currently, C++17 `noexcept` qualifiers are not handled in [libname], because compiler vendors have not implemented support for this feature (to best of the author's knowledge). However, features to account for and manipulate `noexcept` qualifiers are planned in [libname], as soon as feature is implemented by a compiler vendor. Of course, the [libname] feature additions will be non-breaking for currently supported compiler versions.] -[note features for [@https://isocpp.org/files/papers/n4000.pdf [^transaction_safe]] are planned, but not yet implemented.] - -[cc_warning_full] - [endsect][/section:motivation] [section:boost_function_types Regarding [^Boost.FunctionTypes]] @@ -209,11 +135,11 @@ The use cases for [libname] are closely related to those of [function_types_link # Other types in C++ receive fine-grained, low-level attention in [^Boost.TypeTraits] and [^]. [libname] gives callable types similar attention, without additional metaprogramming dependencies. # [libname] aims to eliminate function type template specializations. [function_types] does not. # [libname] targets C++11/14/17 features. [function_types] does not. -# The [function_types] interface relies heavily on tag types. [libname] does not (except for platform-specific calling conventions). +# The [function_types] interface relies heavily on tag types. [libname] does not. -By building on the achievements of others, [libname] borrows and extends much of the functionality found in [function_types], re-packaging it in a more accessible `type_traits`-style interface. There is nothing inherently wrong with [function_types], which is a great choice for projects already using the MPL, and for metaprogramming on older compilers. However, an MPL sequence-based solution with no C++11 support should not be the only option for inspecting and manipulating callable types. +[function_types] is a good tool for projects already dependent on the MPL, which must also support very old compilers. However, the [function_types] interface is unpleasant. It relies heavily on both the MPL and tag types, for problems that are more simply solved with neither. Using [function_types] requires an understanding of the library's "big picture." -See Also: [link callable_traits.faq.faq_function_types Why not update and extend [function_types] instead?] +[libname] borrows and extends much of the functionality found in [function_types], re-packaging it in a more accessible `type_traits`-style interface. There is nothing inherently wrong with [function_types], but an MPL sequence-based solution with no C++11/14/17 support should not be the only library option for inspecting and manipulating callable types. [endsect][/section:boost_function_types] [endsect][/section:introduction] @@ -231,39 +157,16 @@ See Also: [link callable_traits.faq.faq_function_types Why not update and extend [template link_travis_ci[][@https://travis-ci.org/badair/callable_traits/builds Travis]] [template link_appveyor_ci[][@https://ci.appveyor.com/project/badair/callable-traits Appveyor]] -[table -[ [Operating System] [Compiler] [Support] [stdlib] [Continuous Integration] ] -[ [Linux] [Clang 3.5+] [[full_support]] [libc++] [[link_travis_ci]] ] -[ [Linux] [Clang 3.5+] [[full_support]] [libstdc++] [[link_travis_ci]] ] -[ [Linux] [Clang (other)] [[unknown_support]] [libstdc++] [-] ] -[ [Linux] [GCC 5.2.1 +] [[full_support]] [libstdc++] [[link_travis_ci]] ] -[ [Linux] [GCC \[4.8, ~ 5.2.1)] [[partial_support]] [libstdc++] [[link_travis_ci]] ] -[ [Linux] [GCC(other)] [[unknown_support]] [libstdc++] [-] ] -[ [OSX] [AppleClang / XCode 6.3+] [[full_support]] [libc++] [[link_travis_ci]] ] -[ [OSX] [Clang 3.5+] [[likely_support]] [libc++] [-] ] -[ [OSX] [Clang 3.4 and below] [[unknown_support]] [libc++] [-] ] -[ [Windows] [MSVC 19] [[partial_support]] [Dinkumware ([unsure])] [[link_appveyor_ci]] ] -[ [Windows] [MSVC (other)] [[unknown_support]] [Dinkumware ([unsure])] [-] ] -[ [Windows] [Clang-cl 3.7+] [[full_support]] [[unsure]] [-] ] -[ [Windows] [Clang-cl (other)] [[unknown_support]] [[unsure]] [-] ] -[ [Windows] [MinGW GCC 5.3] [[full_support]] [libstdc++] [-] ] -[ [Windows] [MinGW GCC \[4.8, ~ 5.2.1)] [[partial_support]] [libstdc++] [-] ] +[table +[ [Compiler] [Support] [Continuous Integration] ] +[ [Clang 3.5+] [[full_support]] [[link_travis_ci]] ] +[ [GCC 4.8+] [[full_support]] [[link_travis_ci]] ] +[ [AppleClang / XCode 6.3+] [[full_support]] [[link_travis_ci]] ] +[ [MSVC / Visual Studio 2015] [[full_support]] [[link_appveyor_ci]] ] ] CallableTraits has not been tested on every platform under the sun. If you find CallableTraits to work with another toolchain, [link callable_traits.contact let us know!] -[section:compatibility_issues Known Issues] - -* [link_abominable] types are not compatible with some older compilers. Attempts to create [link_abominable] types using [libname] metafunctions will have no effect on the following platforms: - * GCC < 4.9.2 -* [link_abominable] reference-qualified member functions are not compatible with some older compilers. Attempts to create a pointer to a reference-qualified member function using [libname] metafunctions will have no effect on the following platforms: - * GCC < 4.9.2 -* [libname] has ['not] yet been tested on all minor/patch versions of the supported compilers. If you experience problems on a supported platform, [link_contact_the_author]. -* Calling convention support is largely untested. Please [link_contact_the_author] if you have experience in this domain. -* Documentation, test coverage, and API tweaks are currently the primary focus of development. Check out the [@https://github.com/badair/callable_traits/issues Issues page] for more information about progress on this front. - -[endsect][/section:compatibility_issues] - [endsect][/section:compatibility] @@ -277,7 +180,7 @@ CallableTraits has not been tested on every platform under the sun. If you find [section:reasons Why should I use [libname]?] -If you are not writing generic code, you simply shouldn't. +If you are not writing generic code, you shouldn't. If you ['are] writing generic code, take a moment to skim your header files, and see if you can find code that looks like this: @@ -291,6 +194,7 @@ or like this... template class foo { // ^^^^^^^^^^^^^^^^ + //... }; or maybe something like this... @@ -298,6 +202,7 @@ or maybe something like this... template class foo { // ^^^^^^^^^^^^^^^^^^ + //... }; perhaps... @@ -305,6 +210,7 @@ perhaps... template class foo { // ^^^^^^^^^^^^^^^^^^ + //... }; Does this rings a bell? @@ -312,54 +218,18 @@ Does this rings a bell? template class foo { // ^^^^^^^^^^^^^^^^^^^^^ + //... }; Do you hate your job? template - class foo { - // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - }; - -Do you seek revenge against your coworkers? - - #define EXPAND_LIKE_THE_DICKENS(QUALIFIERS) \ - template \ - class foo { \ - /* ... */ \ + class foo { + // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + //... }; -There are real reasons to write code like this, but they are few and far between. Implementers of the `` header and signal libraries have been trudging through these template tarpits for years now. With [libname], you can get rid of every line of code related to these techniques. [libname]'s mission is to rid the world of this code [*forever]. Even if you are only specializing a simple function type like `Return(Args...)`, [libname] can make your code more readable, more maintainable, and less error-prone. - -[endsect] - -[section:reasons What makes [libname] unique?] - -[*1.] [libname] offers template aliases such as [link_remove_member_const] for manipulating function qualifiers, designed to parallel the `` aliases such as `std::remove_const_t`. - -[*2.] [libname] is designed to accept cv-qualified and ref-qualified types, which eliminates the need to prepare template argument types with metafunctions such as `std::remove_reference` and `std::decay`. This is especially useful when dealing with perfectly-forwarded parameter types in function templates. - -[*3.] [libname] is designed to comply with [invoke] rules, with one unobtrusive and beneficial deviation: [link_fn] types are compatible with all relevant type operations that do not specifically require an invocation. - -[*4.] [namespace_scoped][link_arg_at]`<2, Callable>` is more flexible than `typename boost::function_traits::arg3_type`. - -[*5.] (TODO - fill this in) - -[*6.] (TODO - fill this in) - -[*7] (TODO - fill this in) - -[*8.] (TODO - fill this in) - -[*9.] The [libname] interface mainly consists of template aliases and `constexpr std::integral_constant` functions, which are arguably preferable to `typename foo::type` and `foo::value`. While the `std::integral_constant` functions in [libname] may be a deviation from traditional type trait designs, they facilitate a metaprogramming style that uses value-semantics (a la [hana]). The functions can generally be used with either types or values, which eliminates unnecessary `decltype` usage. - -[*10.] [libname] includes optional features for the manipulation and inspection of calling conventions. These features are currently deemed experimental, because they greatly increase the test surface of [libname], are platform-specific, and are not yet fully tested on any platform. - -[endsect][/section:reasons] - -[section:faq_function_types Why not update and extend [function_types] instead?] - -As discussed in the introduction, [function_types] is a good tool for many situations. However, the interface is unpleasant. It which relies heavily on both the MPL and tag types, for problems that are more simply solved with neither. Using [function_types] requires an understanding of MPL sequences, as well as an understanding of the [function_types] "big picture." [function_types] is more complicated than is necessary, and takes longer to grok. In the C++ of today, [function_types] is also sorely lacking in features. Retrofitting [function_types] with the features found in [libname] would mean adding many more tag types, supporting old compilers with too much conditional compilation, and continuing to work around an unnecessary MPL dependency. +There are real reasons to write code like this, but they are few and far between. Implementers of the `` header and signal libraries have been trudging through these template tarpits for years now. With [libname], you can get rid of every line of code related to these techniques. [libname]'s mission is to rid the world of this code forever. Even if you are only specializing a simple function type like `Return(Args...)`, perhaps you will find that [libname] can help make your code more readable, more maintainable, more generic, and less error-prone. [endsect] @@ -369,30 +239,14 @@ Boost contains a handful of excellent type containers. However, [libname] is des [endsect] -[section Why are the [libname] alias templates not suffixed with `_t`, as in `std::add_lvalue_reference_t`?] - -The `_t` alias templates in `` should be appreciated, but not imitated. These alias templates were a belated addition to the standard library. They use a cleaner syntax, so that users can forgo the `typename /*...*/::type` dance. However, it is both ironic and unfortunate that a pair of unnecessary characters (`_t`) are used for the sole purpose of removing some ['other] decidedly unnecessary characters (`typename` and `::type`). It's time to stop the bleeding, cut our losses, and start giving things sensible names. - -[endsect] - -[section Why use constexpr function templates? Why not use something like `std::is_same` or even `std::is_same_v`?] - -Function templates, especially when augmented by overloading them, are the only constructs in C++ that can unequivocally accept ['either] a type ['or] a value argument. Even if variable template support were commonplace among production compilers, function templates would still have the upper hand in this regard. The same argument applies to alias templates and class templates. - -[endsect] - [section Why use reference collapsing rules when adding member function ref-qualifiers?] -Although arbitrary, the reference collapsing rules are well-defined and already known to template metaprogrammers. Anything else would be a burden to memorize. +Although arbitrary, the reference collapsing rules are well-defined and already known to many template metaprogrammers. Anything else would be a burden to memorize. [endsect] [endsect] -[section:development Development] - -[note Boost.Build configuration files have not yet been written for building the tests and examples. The `Boost.Build` configuration files are currently only used by the author to build this documentation (along with a hacky batch script, which is unpublished).] - [section:building Building the test suite] This section contains the instructions for building and running the test cases and documentatation examples that are packaged with [libname]. @@ -474,300 +328,11 @@ To include the experimental examples for calling conventions in the build, appen [tip If you need additional help building the test suite, [link_contact_the_author].] +[note Boost.Build configuration files have not yet been written for building the tests and examples. The `Boost.Build` configuration files are currently only used by the author to build this documentation (along with some unpublished scripting hacks).] + [endsect][/section:building] -[endsect][/section:development] - -[/*********************************************************************] -[/*********************** G L O S S A R Y *****************************] -[/*********************************************************************] - -[section:glossary Glossary] - -[libname] relies on the following terms, which will be referenced throughout the documentation. These terms will always be formatted with [role green green] text. - -In order to avoid significant standardese in the reference sections, we need to syntactically decompose our callable types. Some terms define "elements" to achieve this. This allows us to address multiple terms with the same structure later. - -[template CallingConvention[][^['\[CallingConvention\]]]] -[template MemberQualifiers[][^['\[MemberQualifiers\]]]] -[template VarArgs[][^['\[VarArgs\]]]] -[template Return[][^['\[Return\]]]] -[template ParentClass[][^['\[ParentClass\]]]] -[template Args[][^['\[Args...\]]]] -[template Category[][^['\[Category\]]]] - -[section:ref_fn_ptr [concept_fn_ptr]] - -* Any unqualified pointer to a function type -* e.g. `void(*)(int, int)` -* Elements - * [^[Return] [role red ( [CallingConvention] * )] ( [Args] [VarArgs] )] - * [Category] - in red above - * [MemberQualifiers] - not applicable - * [ParentClass] - not applicable - -[endsect] - -[section:ref_fn_ref [concept_fn_ref]] - -* Any function reference type -* e.g. `void(&)(int, int)` -* Elements - * [^[Return] [role red ( & )] ( [Args] [VarArgs] )] - * [Category] - in red above - * [CallingConvention] - not applicable - * [MemberQualifiers] - not applicable - * [ParentClass] - not applicable - -[endsect] - -[section:ref_simple_fn [concept_simple_fn]] -* Any unqualified function type -* Not technically "callable", but still falls under the [libname] umbrella -* Mutually exclusive with [link_abominable] -* e.g. `void(int, int)` -* Elements - * [^[Return] ( [Args] [VarArgs] )] - * [Category] - not applicable - * [CallingConvention] - not applicable - * [MemberQualifiers] - not applicable - * [ParentClass] - not applicable - -[endsect] - -[section:ref_abominable [concept_abominable]] -* Any qualified (a.k.a. [@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0172r0.html "abominable"]) function type -* Not technically "callable", but still falls under the [libname] umbrella -* Mutually exclusive with [link_simple_fn] -* e.g. `void(int, int) const` -* Elements - * [^[Return] ( [Args] [VarArgs]) [MemberQualifiers]] - * [Category] - not applicable - * [CallingConvention] - not applicable - * [ParentClass] - not applicable - -[endsect] - -[section:ref_fn [concept_fn]] -* The superset of [link_simple_fn] and [link_abominable] - -[endsect] - -[section:ref_pmf [concept_pmf]] - -* Any unqualified pointer to a member function type -* e.g. `void (foo::*)(int, int)` -* Elements - * [^[Return] [role red( [CallingConvention] [ParentClass]::* )] ( [Args] [VarArgs]) [MemberQualifiers]] - * [Category] - in red above - -[endsect] - -[section:ref_pmd [concept_pmd]] - -* Any pointer to data member type -* The pointer type may be cv-qualified and/or ref-qualified -* e.g. `int foo::*` -* Elements - * [^[Return] [role red[ParentClass]::* ]] - * [Category] - in red above - * [CallingConvention] - not applicable - * [MemberQualifiers] - not applicable - * [Args] - not applicable - -[endsect] - -[section:ref_member_ptr [concept_member_ptr]] - -* The superset of [link_pmf] and [link_pmd] - -[endsect] - -[section:ref_simple_fn_obj [concept_simple_fn_obj]] - -* Any class/struct with a ['non-templated, non-overloaded] function call operator -* Includes non-generic lambda types -* May be cv-qualified and/or ref-qualified -* Mutually exclusive with [link_overloaded_fn_obj] -* e.g. the type of this lambda: `[](int x, int y) { return x + y; }` -* Elements - * [Return] - the return type of member `operator()` - * [Args] - the parameter list of member `operator()` - * [MemberQualifiers] - any member qualifiers on `operator()` - * [CallingConvention] - the calling convention used by member on `operator()` - * [ParentClass] - not applicable - * [Category] - not applicable - -[endsect] - -[section:ref_overloaded_fn_obj [concept_overloaded_fn_obj]] - -* Any class/struct with a ['templated or overloaded] function call operator, with the following limitation for those with templated function call operators (which includes generic lambdas): - * If templated , all instantiations must be [@http://stackoverflow.com/questions/35033306/what-does-it-mean-when-one-says-something-is-sfinae-friendly SFINAE-friendly], and must not use [@http://en.cppreference.com/w/cpp/language/indent_name dependent names], except where the dependent "names" are C++ operators. -* May be cv-qualified and/or ref-qualified -* Mutually exclusive with [link_simple_fn_obj] -* e.g. the type of this generic lambda: `[](auto x, auto y) { return x + y; }` - -[tip Generic lambdas or classes with templated function objects that are either not SFINAE-friendly or rely on dependent names for template instantiations are generally incompatible with [libname].] - -[endsect] - -[section:ref_fn_obj [concept_fn_obj]] -* The superset of [link_overloaded_fn_obj] and [link_simple_fn_obj] - -[endsect] - -[section:ref_signature [concept_signature]] -* The superset of the following: - * [link_fn_ptr] - * [link_fn_ref] - * [link_fn] - * [link_pmf] - -[endsect] - -[section:ref_callable [concept_callable]] -* The superset of the following: - * [link_fn_ptr] - * [link_fn_ref] - * [link_fn] - * [link_pmf] - * [link_pmd] - * [link_fn_obj] - -[endsect] - -[section:ref_simple_callable [concept_simple_callable]] -* Includes all [link_callable] types, [*except] [link_overloaded_fn_obj] - -[endsect] - -[section:ref_simple_invokable [concept_simple_invokable]] -* Includes all [link_callable] types, [*except] [link_overloaded_fn_obj] and [link_fn] - -[endsect] - -[section:ref_invokable [concept_invokable]] -* Includes all [link_callable] types, [*except] [link_fn] - -[endsect] - -[section:ref_cc_tag [concept_cc_tag]] -* One of the following types, used to manipulate calling conventions programmatically: - *[namespace_scoped]`cdecl_tag` - * [CallingConvention] - `__cdecl` - *[namespace_scoped]`stdcall_tag` - * [CallingConvention] - `__stdcall` - *[namespace_scoped]`fastcall_tag` - * [CallingConvention] - `__fastcall` - *[namespace_scoped]`pascal_tag` - * [CallingConvention] - `pascal` - -[endsect] - -[endsect][/section:glossary] - - - - -[/*********************************************************************] -[/************************ H E A D E R S ******************************] -[/*********************************************************************] - -[section:headers Headers] -The easiest way to get started using [libname] is to include the main header file, which includes all public header files in [libname]: - -[include_header callable_traits] - -The [libname] interface is also broken down by trait into individual header files. To use only the traits you need, include one or more of the following headers, grouped by category: - - -[section Qualifiers] - -* `const` - * [include_header [link_add_member_const]] - * [include_header [link_remove_member_const]] - * [include_header [link_is_const_member]] - -* `volatile` - * [include_header [link_add_member_volatile]] - * [include_header [link_remove_member_volatile]] - * [include_header [link_is_volatile_member]] - -* `const volatile` - * [include_header [link_add_member_cv]] - * [include_header [link_remove_member_cv]] - -* `&` - * [include_header [link_add_member_lvalue_reference]] - * [include_header [link_is_lvalue_reference_member]] - - -* `&&` - * [include_header [link_add_member_rvalue_reference]] - * [include_header [link_is_rvalue_reference_member]] - -* Other - * [include_header [link_remove_member_reference]] - * [include_header [link_is_reference_member]] - * [include_header [link_has_member_qualifiers]] - -[endsect] - - -[section Parameters and Return Types] - -* [include_header [link_args]] -* [include_header [link_arg_at]] -* [include_header [link_insert_args]] -* [include_header [link_replace_args]] -* [include_header [link_remove_args]] -* [include_header [link_clear_args]] -* [include_header [link_push_back]] -* [include_header [link_push_front]] - -* [include_header [link_function_type]] -* [include_header [link_apply_return]] -* [include_header [link_result_of]] -* [include_header [link_has_void_return]] - -[endsect] - - -[section Member Pointers] - -* [include_header [link_apply_member_pointer]] -* [include_header [link_remove_member_pointer]] - -[endsect] - - -[section Variadics] - -* [include_header [link_add_varargs]] -* [include_header [link_remove_varargs]] -* [include_header [link_has_varargs]] - -[endsect] - - -[section Calling Conventions (experimental)] - -* [include_header [link_add_calling_convention]] -* [include_header [link_remove_calling_convention]] -* [include_header [link_has_calling_convention]] - -[endsect] - -[endsect][/section:headers] - - -[template msvc_incompatible[] is not compatible with the Microsoft Visual C++ compiler in Visual Studio (a.k.a. MSVC). Accordingly, the example(s) below will not compile in MSVC. However, Visual Studio users can still use Clang-cl. Refer to the [link_compatibility_issues] section for more information.] - - - - -[section:ref_add_calling_convention add_calling_convention] +[/[section:ref_add_calling_convention add_calling_convention] [warning This feature is currently considered experimental. Your [feedback] is much appreciated! ] @@ -803,159 +368,30 @@ For `add_calling_convention` to work as-intended, you must: [import ../example/experimental_calling_convention_cdecl.cpp] [experimental_calling_convention_cdecl] -[heading See Also] +[/[heading See Also] * [link_remove_calling_convention] -* [link_has_calling_convention] +* [link_has_calling_convention]] -[endsect][/section:ref_add_calling_convention] +[endsect][/section:ref_add_calling_convention] END COMMENTED OUT DOCUMENTATION] +[import ../include/callable_traits/add_member_const.hpp] +[add_member_const_hpp] +[import ../include/callable_traits/add_member_cv.hpp] +[add_member_cv_hpp] +[import ../include/callable_traits/add_member_lvalue_reference.hpp] +[add_member_lvalue_reference_hpp] -[section:ref_add_member_const add_member_const] - - namespace ``[lib_namespace]`` { - - template - using add_member_const = /* implementation-defined */; - - } - -[heading Constraints] -`T` must be a [link_fn] or [link_pmf]. - -[heading Behavior] -* Adds a `const` qualifier to the signature of `T` (if not already present), such that: - * `add_member_const` aliases `int() const` - * `add_member_const` aliases `int(foo::*)() const volatile` - -[heading Notes] -* Any enabled calling conventions are preserved on [link_pmf] types - -[heading Example] -[import ../example/add_member_const.cpp] -[add_member_const] - -[heading See Also] -* [link_remove_member_const] -* [link_is_const_member] - -[endsect][/section:ref_add_member_const] - - - - - -[section:ref_add_member_cv add_member_cv] - - namespace ``[lib_namespace]`` { - - template - using add_member_cv = /* implementation-defined */; - - } - -[heading Constraints] -`T` must be a [link_fn] or [link_pmf]. - -[heading Behavior] -* Adds both `const` and `volatile` qualifiers to the signature of `T` (if not already present), such that: - * `add_member_cv` aliases `int() const volatile` - * `add_member_cv` aliases `int(foo::*)() const volatile` - -[heading Notes] -* Any enabled calling conventions are preserved on [link_pmf] types - -[heading Example] -[import ../example/add_member_cv.cpp] -[add_member_cv] - -[heading See Also] -* [link_add_member_const] -* [link_add_member_volatile] -* [link_remove_member_cv] -* [link_is_cv_member] - -[endsect][/section:ref_add_member_cv] - - - - - -[section:ref_add_member_lvalue_reference add_member_lvalue_reference] - - namespace ``[lib_namespace]`` { - - template - using add_member_lvalue_reference = /* implementation-defined */; - - } - -[heading Constraints] -`T` must be a [link_fn] or [link_pmf]. - -[heading Behavior] -* Adds an lvalue reference qualifier (`&`) qualifier to the signature of `T` (if not already present) -* If an rvalue reference qualifier is present, the lvalue reference qualifier replaces it (in arbitrary accordance with reference collapsing rules) -* Such that: - * `add_member_lvalue_reference` aliases `int() &` - * `add_member_lvalue_reference` aliases `int(foo::*)() const &` - * `add_member_lvalue_reference` aliases `int(foo::*)() &` - -[heading Notes] -* Any enabled calling conventions are preserved on [link_pmf] types - -[heading Example] -[import ../example/add_member_lvalue_reference.cpp] -[add_member_lvalue_reference] - -[heading See Also] -* [link_is_lvalue_reference_member] -* [link_add_member_rvalue_reference] -* [link_remove_member_reference] - -[endsect][/section:ref_add_member_lvalue_reference] - - - - -[section:ref_add_member_rvalue_reference add_member_rvalue_reference] - - namespace ``[lib_namespace]`` { - - template - using add_member_rvalue_reference = /* implementation-defined */; - - } - -[heading Constraints] -`T` must be a [link_fn] or [link_pmf]. - -[heading Behavior] -* Adds an rvalue reference qualifier (`&&`) qualifier to the signature of `T` (if not already present) -* If an lvalue reference qualifier is present, the lvalue reference qualifier remains (in arbitrary accordance with reference collapsing rules) -* Such that: - * `add_member_rvalue_reference` aliases `int() &&` - * `add_member_rvalue_reference` aliases `int(foo::*)() const &` - * `add_member_rvalue_reference` aliases `int(foo::*)() &&` - -[heading Notes] -* Any enabled calling conventions are preserved on [link_pmf] types - -[heading Example] -[import ../example/add_member_rvalue_reference.cpp] -[add_member_rvalue_reference] - -[heading See Also] -* [link_add_member_lvalue_reference] -* [link_remove_member_reference] - -[endsect][/section:ref_add_member_rvalue_reference] - - +[import ../include/callable_traits/add_member_rvalue_reference.hpp] +[add_member_rvalue_reference_hpp] +[import ../include/callable_traits/add_member_volatile.hpp] +[add_member_volatile_hpp] +[import ../include/callable_traits/add_transaction_safe.hpp] +[add_transaction_safe_hpp] [section:ref_add_varargs add_varargs] @@ -963,7 +399,6 @@ For `add_calling_convention` to work as-intended, you must: template using add_varargs = /* implementation-defined */; - } [heading Constraints] @@ -982,58 +417,12 @@ For `add_calling_convention` to work as-intended, you must: * `add_varargs` aliases `int(&)(int, ...)` * `add_varargs` aliases `int(foo::*)(...) const` -[heading Notes] -* Any enabled calling conventions are preserved on [link_fn_ptr] and [link_pmf] types - [heading Example] [import ../example/add_varargs.cpp] [add_varargs] -[heading See Also] -* [link_remove_varargs] -* [link_has_varargs] -* [link_remove_member_reference] - [endsect][/section:ref_add_varargs] - - - - -[section:ref_add_member_volatile add_member_volatile] - - namespace ``[lib_namespace]`` { - - template - using add_member_volatile = /* implementation-defined */; - - } - -[heading Constraints] -`T` must be a [link_fn] or [link_pmf]. - -[heading Behavior] -* Adds a `volatile` qualifier to the signature of `T` (if not already present), such that: - * `add_member_volatile` aliases `int() volatile` - * `add_member_volatile` aliases `int(foo::*)() const volatile` - * `add_member_volatile` aliases `int(foo::*)() volatile` - -[heading Notes] -* Any enabled calling conventions are preserved on [link_pmf] types - -[heading Example] -[import ../example/add_member_volatile.cpp] -[add_member_volatile] - -[heading See Also] -* [link_remove_member_volatile] -* [link_is_volatile_member] - -[endsect][/section:ref_add_member_volatile] - - - - [section:ref_apply_member_pointer apply_member_pointer] namespace ``[lib_namespace]`` { @@ -1060,8 +449,8 @@ For `add_calling_convention` to work as-intended, you must: [import ../example/apply_member_pointer.cpp] [apply_member_pointer] -[heading See Also] -* [link_remove_member_pointer] +[/[heading See Also] +* [link_remove_member_pointer]] [endsect][/section:ref_apply_member_pointer] @@ -1125,9 +514,9 @@ For `add_calling_convention` to work as-intended, you must: [/import ../example/arg_at.cpp] [arg_at] -[heading See Also] +[/[heading See Also] * [link_args] -* [link_expand_args] +* [link_expand_args]] [endsect][/section:ref_arg_at] @@ -1162,9 +551,9 @@ For `add_calling_convention` to work as-intended, you must: [import ../example/args.cpp] [args] -[heading See Also] +[/[heading See Also] * [link_arg_at] -* [link_expand_args] +* [link_expand_args]] [endsect][/secttion:ref_args] @@ -1334,9 +723,9 @@ For `add_calling_convention` to work as-intended, you must: TODO - PMD and PMF examples -[heading See Also] +[/[heading See Also] * [link_args] -* [link_result_of] +* [link_result_of]] [endsect][/section:ref_function_type] @@ -1380,9 +769,9 @@ For `has_calling_convention` to work as-intended, you must: [heading Example - [^__fastcall] to [^__stdcall]] [experimental_changing_calling_conventions] -[heading See Also] +[/[heading See Also] * [link_add_calling_convention] -* [link_remove_calling_convention] +* [link_remove_calling_convention]] [endsect] @@ -1418,9 +807,9 @@ For `has_calling_convention` to work as-intended, you must: [/import ../example/has_varargs.cpp] [has_varargs] -[heading See Also] +[/[heading See Also] * [link_add_varargs] -* [link_remove_varargs] +* [link_remove_varargs]] [endsect] @@ -1528,58 +917,58 @@ TODO [remove_member_volatile] [endsect] -[section:ref_push_back push_back] +[section:ref_push_back_args push_back_args] namespace ``[lib_namespace]`` { template - using push_back = /* implementation-defined */; + using push_back_args = /* implementation-defined */; } [heading Constraints] * `T` must be a [link_signature] [heading Behavior] -* `push_back` aliases a type identical to `T`, except that `NewArgs...` have been appended to the back of `T`'s parameter list [Args]. +* `push_back_args` aliases a type identical to `T`, except that `NewArgs...` have been appended to the back of `T`'s parameter list [Args]. * [VarArgs] remain if present in `T`. [heading Example] -[import ../example/push_back.cpp] -[push_back] +[import ../example/push_back_args.cpp] +[push_back_args] [endsect] -[section:ref_push_front push_front] +[section:ref_push_front_args push_front_args] namespace ``[lib_namespace]`` { template - using push_front = /* implementation-defined */; + using push_front_args = /* implementation-defined */; } [heading Constraints] * `T` must be a [link_signature] [heading Behavior] -* `push_back` aliases a type identical to `T`, except that `NewArgs...` have been appended to the front of `T`'s parameter list [Args]. +* `push_back_args` aliases a type identical to `T`, except that `NewArgs...` have been appended to the front of `T`'s parameter list [Args]. * [VarArgs] remain if present in `T`. [heading Example] -[import ../example/push_front.cpp] -[push_front] +[import ../example/push_front_args.cpp] +[push_front_args] [endsect] -[section:ref_pop_back pop_back] +[section:ref_pop_back_args pop_back_args] TODO [heading Example] -[import ../example/pop_back.cpp] -[pop_back] +[import ../example/pop_back_args.cpp] +[pop_back_args] [endsect] -[section:ref_push_front pop_front] +[section:ref_push_front_args pop_front_args] TODO [heading Example] -[import ../example/pop_front.cpp] -[pop_front] +[import ../example/pop_front_args.cpp] +[pop_front_args] [endsect] [section:ref_result_of result_of] diff --git a/doc/html/callable_traits/building.html b/doc/html/callable_traits/building.html new file mode 100644 index 0000000..7bc3ec0 --- /dev/null +++ b/doc/html/callable_traits/building.html @@ -0,0 +1,276 @@ + + + +Building the test suite + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +

+ This section contains the instructions for building and running the test cases + and documentatation examples that are packaged with CallableTraits. +

+
+ + + + + +
[Note]Note

+ For compilers with "basic" support in CallableTraits, + test cases for unsupported features are replaced with int + main(){} + via conditional compilation. For more information about compiler versions + and supported features, refer to the Compatibility + section. +

+

+ + Dependencies +

+

+ Even though the CallableTraits headers do not rely on external + dependencies, you'll need to install CMake + version 3.0 or higher to use the test suite. For Windows users who wish to + build the test suite with Visual Studio 2015 Update 2, it appears that CMake + version 3.5 or higher is required. The build instructions assume that both + CMake and Git executables exist in your environment PATH. +

+

+ + One-click + scripts +

+

+ For convenience, one-click testing scripts for Linux and Windows are packaged + with CallableTraits, each of which must be run from the + directory in which the script resides. Running one of these scripts will create + a build-xxx subdirectory in the CallableTraits + root directory, and perform all testing there. Even though these scripts were + designed to be as generic as possible, issues may exist because they have not + seen widespread use. Refer to the console instructions below if the provided + testing scripts do not work for you. +

+

+ First, clone the repository: +

+
git clone http://github.com/badair/callable_traits
+
+
    +
  • + Linux (possibly OSX - untested) +
      +
    • + Examples related to calling conventions are excluded + from these build scripts +
    • +
    • + script directory: [CallableTraits root]/scripts/posix +
        +
      • + gcc-libcstdxx.sh +
          +
        • + compiles with the g++ version found in the PATH +
        • +
        • + This is the script most likely to work out-of-the-box, + since GCC 4.8 comes pre-installed on many Linux distributions +
        • +
        +
      • +
      • + clang-libcxx.sh +
          +
        • + compiles with the clang++ executable in the PATH +
        • +
        • + uses libc++ for the standard library implementation +
        • +
        +
      • +
      • + clang-libcstdxx.sh +
          +
        • + compiles with the clang++ executable in the PATH +
        • +
        • + uses libstdc++ for the standard library implementation +
        • +
        +
      • +
      +
    • +
    +
  • +
  • + Windows +
      +
    • + Examples related to calling conventions are included + in these build scripts +
    • +
    • + script directory: [CallableTraits root]\scripts\windows +
        +
      • + MSVC-Win32-Debug.bat +
          +
        • + compiles with MSVC 19 +
        • +
        • + Visual Studio 2015 must be installed in the default install + directory +
        • +
        +
      • +
      • + LLVM-vs2014-Win32-Debug.bat +
          +
        • + compiles with clang/c2 +
        • +
        • + Visual Studio 2015 must be installed in the default install + directory +
        • +
        • + This script assumes that the Windows Installer found + on this page + was used to install LLVM, which is integrated with Visual + Studio +
        • +
        +
      • +
      • + MinGW-Win32-Release.bat +
          +
        • + compiles with a MinGW-based GCC build +
        • +
        • + requires a Windows + build of GNU Make to be installed and present + in the PATH +
        • +
        • + Expects to find the MinGW root directory at C:\\MinGW* +
        • +
        +
      • +
      +
    • +
    +
  • +
+

+ + Console instructions + - Linux/OSX +

+

+ Open a shell and enter the following commands: +

+
git clone http://github.com/badair/callable_traits
+cd callable_traits
+mkdir build
+cd build
+cmake .. -DCMAKE_CXX_COMPILER=/path/to/compiler
+make check
+
+

+ + Console + instructions - Windows +

+

+ Cygwin and MSYS users should refer to the Linux section (you know who you are). +

+

+ Fire up cmd.exe and enter the following commands: +

+
+ + + + + +
[Note]Note

+ These commands assume that Visual Studio 2015 was installed in the default + directory. git and CMake executables are expected to be present in the evironment + PATH. A 64 bit Windows install is assumed. +

+
git clone http://github.com/badair/callable_traits
+cd callable_traits
+mkdir build
+cd build
+cmake .. -G"Visual Studio 14 2015"
+"%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe" check.vcxproj /t:build /p:Configuration=Debug /p:Platform=Win32 /v:n /nologo
+
+

+ To include the experimental examples for calling conventions in the build, + append -DCALLABLE_TRAITS_BUILD_EXPERIMENTAL=ON to the + CMake arguments. To build with Clang/C2 instead of MSVC, append -TLLVM-vs2014 to the CMake arguments. This will + only work if you have Clang/C2 + installed. +

+
+ + + + + +
[Tip]Tip

+ If you need additional help building the test suite, contact + the author. +

+
+ + + + + +
[Note]Note

+ Boost.Build configuration files have not yet been written for building the + tests and examples. The Boost.Build + configuration files are currently only used by the author to build this documentation + (along with some unpublished scripting hacks). +

+
+ + + +
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/html/callable_traits/compatibility.html b/doc/html/callable_traits/compatibility.html index 5abf4dc..bd4d380 100644 --- a/doc/html/callable_traits/compatibility.html +++ b/doc/html/callable_traits/compatibility.html @@ -26,22 +26,13 @@ -
-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

- Operating System -

-

Compiler @@ -52,11 +43,6 @@ Support

-

- stdlib -

-

Continuous Integration @@ -65,11 +51,6 @@

-

- Linux -

-

Clang 3.5+ @@ -80,11 +61,6 @@ Yes

-

- libc++ -

-

Travis @@ -94,12 +70,7 @@

- Linux -

-
-

- Clang 3.5+ + GCC 4.8+

@@ -107,11 +78,6 @@ Yes

-

- libstdc++ -

-

Travis @@ -119,119 +85,6 @@

-

- Linux -

-
-

- Clang (other) -

-
-

- No/Unknown -

-
-

- libstdc++ -

-
-

- - -

-
-

- Linux -

-
-

- GCC 5.2.1 + -

-
-

- Yes -

-
-

- libstdc++ -

-
-

- Travis -

-
-

- Linux -

-
-

- GCC [4.8, ~ 5.2.1) -

-
-

- Yes (basic) -

-
-

- libstdc++ -

-
-

- Travis -

-
-

- Linux -

-
-

- GCC(other) -

-
-

- No/Unknown -

-
-

- libstdc++ -

-
-

- - -

-
-

- OSX -

-

AppleClang / XCode 6.3+ @@ -242,11 +95,6 @@ Yes

-

- libc++ -

-

Travis @@ -256,76 +104,12 @@

- OSX + MSVC / Visual Studio 2015

- Clang 3.5+ -

-
-

- Untested - likely -

-
-

- libc++ -

-
-

- - -

-
-

- OSX -

-
-

- Clang 3.4 and below -

-
-

- No/Unknown -

-
-

- libc++ -

-
-

- - -

-
-

- Windows -

-
-

- MSVC 19 -

-
-

- Yes (basic) -

-
-

- Dinkumware (?) + Yes

@@ -334,141 +118,6 @@

-

- Windows -

-
-

- MSVC (other) -

-
-

- No/Unknown -

-
-

- Dinkumware (?) -

-
-

- - -

-
-

- Windows -

-
-

- Clang-cl 3.7+ -

-
-

- Yes -

-
-

- ? -

-
-

- - -

-
-

- Windows -

-
-

- Clang-cl (other) -

-
-

- No/Unknown -

-
-

- ? -

-
-

- - -

-
-

- Windows -

-
-

- MinGW GCC 5.3 -

-
-

- Yes -

-
-

- libstdc++ -

-
-

- - -

-
-

- Windows -

-
-

- MinGW GCC [4.8, ~ 5.2.1) -

-
-

- Yes (basic) -

-
-

- libstdc++ -

-
-

- - -

-

@@ -476,49 +125,6 @@ find CallableTraits to work with another toolchain, let us know!

-
- -
    -
  • - AbominableFunction - types are not compatible with some older compilers. Attempts to create - AbominableFunction - types using CallableTraits metafunctions will have - no effect on the following platforms: -
    • - GCC < 4.9.2 -
    -
  • -
  • - AbominableFunction - reference-qualified member functions are not compatible with some older - compilers. Attempts to create a pointer to a reference-qualified member - function using CallableTraits metafunctions will have - no effect on the following platforms: -
    • - GCC < 4.9.2 -
    -
  • -
  • - CallableTraits has not yet been - tested on all minor/patch versions of the supported compilers. If you - experience problems on a supported platform, contact - the author. -
  • -
  • - Calling convention support is largely untested. Please contact - the author if you have experience in this domain. -
  • -
  • - Documentation, test coverage, and API tweaks are currently the primary - focus of development. Check out the Issues - page for more information about progress on this front. -
  • -
-
diff --git a/doc/html/callable_traits/development.html b/doc/html/callable_traits/development.html deleted file mode 100644 index ac18b97..0000000 --- a/doc/html/callable_traits/development.html +++ /dev/null @@ -1,285 +0,0 @@ - - - -Development - - - - - - - - -
- - - - - - -
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
-
-
-PrevUpHomeNext -
-
- - -
- - - - - -
[Note]Note

- Boost.Build configuration files have not yet been written for building the - tests and examples. The Boost.Build - configuration files are currently only used by the author to build this documentation - (along with a hacky batch script, which is unpublished). -

-
- -

- This section contains the instructions for building and running the test - cases and documentatation examples that are packaged with CallableTraits. -

-
- - - - - -
[Note]Note

- For compilers with "basic" support in CallableTraits, - test cases for unsupported features are replaced with int - main(){} - via conditional compilation. For more information about compiler versions - and supported features, refer to the Compatibility - section. -

-
- - Dependencies -
-

- Even though the CallableTraits headers do not rely on - external dependencies, you'll need to install CMake - version 3.0 or higher to use the test suite. For Windows users who wish to - build the test suite with Visual Studio 2015 Update 2, it appears that CMake - version 3.5 or higher is required. The build instructions assume that both - CMake and Git executables exist in your environment PATH. -

-
- - One-click - scripts -
-

- For convenience, one-click testing scripts for Linux and Windows are packaged - with CallableTraits, each of which must be run from the - directory in which the script resides. Running one of these scripts will - create a build-xxx subdirectory in the CallableTraits - root directory, and perform all testing there. Even though these scripts - were designed to be as generic as possible, issues may exist because they - have not seen widespread use. Refer to the console instructions below if - the provided testing scripts do not work for you. -

-

- First, clone the repository: -

-
git clone http://github.com/badair/callable_traits
-
-
    -
  • - Linux (possibly OSX - untested) -
      -
    • - Examples related to calling conventions are excluded - from these build scripts -
    • -
    • - script directory: [CallableTraits root]/scripts/posix -
        -
      • - gcc-libcstdxx.sh -
          -
        • - compiles with the g++ version found in the PATH -
        • -
        • - This is the script most likely to work out-of-the-box, - since GCC 4.8 comes pre-installed on many Linux distributions -
        • -
        -
      • -
      • - clang-libcxx.sh -
          -
        • - compiles with the clang++ executable in the PATH -
        • -
        • - uses libc++ for the standard library implementation -
        • -
        -
      • -
      • - clang-libcstdxx.sh -
          -
        • - compiles with the clang++ executable in the PATH -
        • -
        • - uses libstdc++ for the standard library implementation -
        • -
        -
      • -
      -
    • -
    -
  • -
  • - Windows -
      -
    • - Examples related to calling conventions are included - in these build scripts -
    • -
    • - script directory: [CallableTraits root]\scripts\windows -
        -
      • - MSVC-Win32-Debug.bat -
          -
        • - compiles with MSVC 19 -
        • -
        • - Visual Studio 2015 must be installed in the default - install directory -
        • -
        -
      • -
      • - LLVM-vs2014-Win32-Debug.bat -
          -
        • - compiles with clang/c2 -
        • -
        • - Visual Studio 2015 must be installed in the default - install directory -
        • -
        • - This script assumes that the Windows Installer found - on this page - was used to install LLVM, which is integrated with - Visual Studio -
        • -
        -
      • -
      • - MinGW-Win32-Release.bat -
          -
        • - compiles with a MinGW-based GCC build -
        • -
        • - requires a Windows - build of GNU Make to be installed and present - in the PATH -
        • -
        • - Expects to find the MinGW root directory at C:\\MinGW* -
        • -
        -
      • -
      -
    • -
    -
  • -
-
- - Console - instructions - Linux/OSX -
-

- Open a shell and enter the following commands: -

-
git clone http://github.com/badair/callable_traits
-cd callable_traits
-mkdir build
-cd build
-cmake .. -DCMAKE_CXX_COMPILER=/path/to/compiler
-make check
-
-
- - Console - instructions - Windows -
-

- Cygwin and MSYS users should refer to the Linux section (you know who you - are). -

-

- Fire up cmd.exe and enter the following commands: -

-
- - - - - -
[Note]Note

- These commands assume that Visual Studio 2015 was installed in the default - directory. git and CMake executables are expected to be present in the - evironment PATH. A 64 bit Windows install is assumed. -

-
git clone http://github.com/badair/callable_traits
-cd callable_traits
-mkdir build
-cd build
-cmake .. -G"Visual Studio 14 2015"
-"%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe" check.vcxproj /t:build /p:Configuration=Debug /p:Platform=Win32 /v:n /nologo
-
-

- To include the experimental examples for calling conventions in the build, - append -DCALLABLE_TRAITS_BUILD_EXPERIMENTAL=ON to - the CMake arguments. To build with Clang/C2 instead of MSVC, append -TLLVM-vs2014 - to the CMake arguments. This will only work if you have Clang/C2 - installed. -

-
- - - - - -
[Tip]Tip

- If you need additional help building the test suite, contact - the author. -

-
-
- - - -
-
-
-PrevUpHomeNext -
- - diff --git a/doc/html/callable_traits/faq.html b/doc/html/callable_traits/faq.html index dbefd38..80ad281 100644 --- a/doc/html/callable_traits/faq.html +++ b/doc/html/callable_traits/faq.html @@ -7,7 +7,7 @@ - + @@ -20,7 +20,7 @@

-PrevUpHomeNext +PrevUpHomeNext

- If you are not writing generic code, you simply shouldn't. + If you are not writing generic code, you shouldn't.

If you are writing generic code, take a moment to skim @@ -65,6 +55,7 @@

template<class Return, class ...Args>
 class foo<Return(Args...)> {
     //   ^^^^^^^^^^^^^^^^
+    //...
 };
 

@@ -73,6 +64,7 @@

template<class Return, class ...Args>
 class foo<Return(*)(Args...)> {
     //     ^^^^^^^^^^^^^^^^^^
+    //...
 };
 

@@ -81,6 +73,7 @@

template<class Return, class ...Args>
 class foo<Return(&)(Args...)> {
     //    ^^^^^^^^^^^^^^^^^^
+    //...
 };
 

@@ -89,23 +82,16 @@

template<class Return, class T, class ...Args>
 class foo<Return(T::*)(Args...)> {
     //    ^^^^^^^^^^^^^^^^^^^^^
+    //...
 };
 

Do you hate your job?

template<class Return, class T, class ...Args>
-class foo<Return( __cdecl T::*)(Args..., ...) const volatile &&> {
-    //    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-};
-
-

- Do you seek revenge against your coworkers? -

-
#define EXPAND_LIKE_THE_DICKENS(QUALIFIERS)    \
-template<class Return, class T, class ...Args> \
-class foo<Return(T::*)(Args...) QUALIFIERS> {  \
-    /* ... */                                  \
+class foo<Return(T::*)(Args..., ...) const volatile && transaction_safe> {
+    //    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+    //...
 };
 

@@ -114,90 +100,10 @@ header and signal libraries have been trudging through these template tarpits for years now. With CallableTraits, you can get rid of every line of code related to these techniques. CallableTraits's - mission is to rid the world of this code forever. - Even if you are only specializing a simple function type like Return(Args...), - CallableTraits can make your code more readable, more - maintainable, and less error-prone. -

- -
- -

- 1. CallableTraits offers - template aliases such as remove_member_const - for manipulating function qualifiers, designed to parallel the <type_traits> aliases such as std::remove_const_t. -

-

- 2. CallableTraits is - designed to accept cv-qualified and ref-qualified types, which eliminates - the need to prepare template argument types with metafunctions such as std::remove_reference - and std::decay. This is especially useful when dealing - with perfectly-forwarded parameter types in function templates. -

-

- 3. CallableTraits is - designed to comply with INVOKE - rules, with one unobtrusive and beneficial deviation: Function types are compatible with all relevant - type operations that do not specifically require an invocation. -

-

- 4. callable_traits::arg_at<2, - Callable> - is more flexible than typename boost::function_traits<Callable>::arg3_type. -

-

- 5. (TODO - fill this in) -

-

- 6. (TODO - fill this in) -

-

- 7 (TODO - fill this in) -

-

- 8. (TODO - fill this in) -

-

- 9. The CallableTraits - interface mainly consists of template aliases and constexpr - std::integral_constant functions, which are - arguably preferable to typename foo::type - and foo::value. While the std::integral_constant - functions in CallableTraits may be a deviation from traditional - type trait designs, they facilitate a metaprogramming style that uses value-semantics - (a la Boost.Hana). - The functions can generally be used with either types or values, which eliminates - unnecessary decltype usage. -

-

- 10. CallableTraits includes - optional features for the manipulation and inspection of calling conventions. - These features are currently deemed experimental, because they greatly increase - the test surface of CallableTraits, are platform-specific, - and are not yet fully tested on any platform. -

-
-
- -

- As discussed in the introduction, Boost.FunctionTypes - is a good tool for many situations. However, the interface is unpleasant. - It which relies heavily on both the MPL and tag types, for problems that - are more simply solved with neither. Using Boost.FunctionTypes - requires an understanding of MPL sequences, as well as an understanding of - the Boost.FunctionTypes "big picture." Boost.FunctionTypes - is more complicated than is necessary, and takes longer to grok. In the C++ - of today, Boost.FunctionTypes is also sorely lacking in - features. Retrofitting Boost.FunctionTypes with the features - found in CallableTraits would mean adding many more tag - types, supporting old compilers with too much conditional compilation, and - continuing to work around an unnecessary MPL dependency. + mission is to rid the world of this code forever. Even if you are only specializing + a simple function type like Return(Args...), + perhaps you will find that CallableTraits can help make + your code more readable, more maintainable, more generic, and less error-prone.

@@ -213,47 +119,13 @@
-

- The _t alias templates in - <type_traits> should be appreciated, but not imitated. - These alias templates were a belated addition to the standard library. They - use a cleaner syntax, so that users can forgo the typename - /*...*/::type dance. However, it is both ironic - and unfortunate that a pair of unnecessary characters (_t) - are used for the sole purpose of removing some other - decidedly unnecessary characters (typename - and ::type). - It's time to stop the bleeding, cut our losses, and start giving things sensible - names. -

-
-
- -

- Function templates, especially when augmented by overloading them, are the - only constructs in C++ that can unequivocally accept either - a type or a value argument. Even if variable template - support were commonplace among production compilers, function templates would - still have the upper hand in this regard. The same argument applies to alias - templates and class templates. -

-
-
-

Although arbitrary, the reference collapsing rules are well-defined and already - known to template metaprogrammers. Anything else would be a burden to memorize. + known to many template metaprogrammers. Anything else would be a burden to + memorize.

@@ -267,7 +139,7 @@
-PrevUpHomeNext +PrevUpHomeNext
diff --git a/doc/html/callable_traits/glossary.html b/doc/html/callable_traits/glossary.html deleted file mode 100644 index a324192..0000000 --- a/doc/html/callable_traits/glossary.html +++ /dev/null @@ -1,518 +0,0 @@ - - - -Glossary - - - - - - - - - - - - - - - -
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
-
-
-PrevUpHomeNext -
-
- - -

- CallableTraits relies on the following terms, which will - be referenced throughout the documentation. These terms will always be formatted - with green text. -

-

- In order to avoid significant standardese in the reference sections, we need - to syntactically decompose our callable types. Some terms define "elements" - to achieve this. This allows us to address multiple terms with the same structure - later. -

-
- -
    -
  • - Any unqualified pointer to a function type -
  • -
  • - e.g. void(*)(int, int) -
  • -
  • - Elements -
      -
    • - [Return] ( [CallingConvention] - * ) ( [Args...] - [VarArgs] ) -
    • -
    • - [Category] - in red above -
    • -
    • - [MemberQualifiers] - not - applicable -
    • -
    • - [ParentClass] - not applicable -
    • -
    -
  • -
-
-
- -
    -
  • - Any function reference type -
  • -
  • - e.g. void(&)(int, int) -
  • -
  • - Elements -
      -
    • - [Return] ( & ) ( [Args...] - [VarArgs] ) -
    • -
    • - [Category] - in red above -
    • -
    • - [CallingConvention] - not - applicable -
    • -
    • - [MemberQualifiers] - not - applicable -
    • -
    • - [ParentClass] - not applicable -
    • -
    -
  • -
-
-
- -
    -
  • - Any unqualified function type -
  • -
  • - Not technically "callable", but still falls under the CallableTraits - umbrella -
  • -
  • - Mutually exclusive with AbominableFunction -
  • -
  • - e.g. void(int, int) -
  • -
  • - Elements -
      -
    • - [Return] ( [Args...] - [VarArgs] ) -
    • -
    • - [Category] - not applicable -
    • -
    • - [CallingConvention] - not - applicable -
    • -
    • - [MemberQualifiers] - not - applicable -
    • -
    • - [ParentClass] - not applicable -
    • -
    -
  • -
-
-
- -
    -
  • - Any qualified (a.k.a. "abominable") - function type -
  • -
  • - Not technically "callable", but still falls under the CallableTraits - umbrella -
  • -
  • - Mutually exclusive with UnqualifiedFunction -
  • -
  • - e.g. void(int, int) const -
  • -
  • - Elements -
      -
    • - [Return] ( [Args...] - [VarArgs]) [MemberQualifiers] -
    • -
    • - [Category] - not applicable -
    • -
    • - [CallingConvention] - not - applicable -
    • -
    • - [ParentClass] - not applicable -
    • -
    -
  • -
-
-
- -
-
-
- -
    -
  • - Any unqualified pointer to a member function type -
  • -
  • - e.g. void (foo::*)(int, int) -
  • -
  • - Elements -
      -
    • - [Return] ( [CallingConvention] - [ParentClass]::* ) - ( [Args...] [VarArgs]) - [MemberQualifiers] -
    • -
    • - [Category] - in red above -
    • -
    -
  • -
-
-
- -
    -
  • - Any pointer to data member type -
  • -
  • - The pointer type may be cv-qualified and/or ref-qualified -
  • -
  • - e.g. int foo::* -
  • -
  • - Elements -
      -
    • - [Return] [ParentClass]::* - -
    • -
    • - [Category] - in red above -
    • -
    • - [CallingConvention] - not - applicable -
    • -
    • - [MemberQualifiers] - not - applicable -
    • -
    • - [Args...] - not applicable -
    • -
    -
  • -
-
-
- -
-
-
- -
    -
  • - Any class/struct with a non-templated, non-overloaded - function call operator -
  • -
  • - Includes non-generic lambda types -
  • -
  • - May be cv-qualified and/or ref-qualified -
  • -
  • - Mutually exclusive with OverloadedFunctionObject -
  • -
  • - e.g. the type of this lambda: [](int x, int y) { return x + y; } -
  • -
  • - Elements -
      -
    • - [Return] - the return type - of member operator() -
    • -
    • - [Args...] - the parameter - list of member operator() -
    • -
    • - [MemberQualifiers] - any - member qualifiers on operator() -
    • -
    • - [CallingConvention] - the - calling convention used by member on operator() -
    • -
    • - [ParentClass] - not applicable -
    • -
    • - [Category] - not applicable -
    • -
    -
  • -
-
-
- -
    -
  • - Any class/struct with a templated or overloaded - function call operator, with the following limitation for those with - templated function call operators (which includes generic lambdas): -
    -
  • -
  • - May be cv-qualified and/or ref-qualified -
  • -
  • - Mutually exclusive with SimpleFunctionObject -
  • -
  • - e.g. the type of this generic lambda: [](auto x, auto y) { return x + y; } -
  • -
-
- - - - - -
[Tip]Tip

- Generic lambdas or classes with templated function objects that are either - not SFINAE-friendly or rely on dependent names for template instantiations - are generally incompatible with CallableTraits. -

-
- -
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
  • - One of the following types, used to manipulate calling conventions programmatically: -
      -
    • - callable_traits::cdecl_tag -
      • - [CallingConvention] - - __cdecl -
      -
    • -
    • - callable_traits::stdcall_tag -
      • - [CallingConvention] - - __stdcall -
      -
    • -
    • - callable_traits::fastcall_tag -
      • - [CallingConvention] - - __fastcall -
      -
    • -
    • - callable_traits::pascal_tag -
      • - [CallingConvention] - - pascal -
      -
    • -
    -
-
-
- - - -
-
-
-PrevUpHomeNext -
- - diff --git a/doc/html/callable_traits/headers.html b/doc/html/callable_traits/headers.html deleted file mode 100644 index 2bba811..0000000 --- a/doc/html/callable_traits/headers.html +++ /dev/null @@ -1,236 +0,0 @@ - - - -Headers - - - - - - - - - - - - - - - -
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
-
-
-PrevUpHomeNext -
-
- - -

- The easiest way to get started using CallableTraits is to - include the main header file, which includes all public header files in CallableTraits: -

-

- #include<callable_traits/callable_traits.hpp> -

-

- The CallableTraits interface is also broken down by trait - into individual header files. To use only the traits you need, include one - or more of the following headers, grouped by category: -

-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- - - -
-
-
-PrevUpHomeNext -
- - diff --git a/doc/html/callable_traits/ref_add_calling_convention.html b/doc/html/callable_traits/ref_add_calling_convention.html deleted file mode 100644 index 26af810..0000000 --- a/doc/html/callable_traits/ref_add_calling_convention.html +++ /dev/null @@ -1,190 +0,0 @@ - - - -add_calling_convention - - - - - - - - - - - - - - - -
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
-
-
-PrevUpHomeNext -
-
- -
- - - - - -
[Warning]Warning

- This feature is currently considered experimental. Your feedback - is much appreciated! -

-
namespace callable_traits {
-
-    template<typename T, typename CcTag>
-    using add_calling_convention = /* implementation-defined */;
-
-}
-
-

- - Constraints -

-
-

- - Behavior -

-

- Adds the calling convention specified by CcTag - to the pointer type T. -

-

- - Notes -

-

- For add_calling_convention - to work as-intended, you must: -

-
    -
  1. - Be programming on a platform that supports adding the desired calling convention - to type T -
  2. -
  3. - Define one or more of the following macros before including any CallableTraits - headers: -
      -
    • - CALLABLE_TRAITS_ENABLE_CDECL - for __cdecl -
    • -
    • - CALLABLE_TRAITS_ENABLE_STDCALL - for __stdcall -
    • -
    • - CALLABLE_TRAITS_ENABLE_FASTCALL - for __fastcall -
    • -
    • - CALLABLE_TRAITS_ENABLE_PASCAL - for pascal -
    • -
    -
  4. -
-

- - Example - - __fastcall to __stdcall -

-
#define CALLABLE_TRAITS_ENABLE_STDCALL
-#define CALLABLE_TRAITS_ENABLE_FASTCALL
-
-#include <type_traits>
-#include <callable_traits/has_calling_convention.hpp>
-#include <callable_traits/add_calling_convention.hpp>
-#include <callable_traits/remove_calling_convention.hpp>
-
-namespace ct = callable_traits;
-
-int main() {
-
-    using f = void(__fastcall *)(int);
-
-    static_assert(ct::has_calling_convention<f, ct::fastcall_tag>(), "");
-    static_assert(!ct::has_calling_convention<f, ct::stdcall_tag>(), "");
-
-    using expect = void(__stdcall *)(int);
-
-    static_assert(ct::has_calling_convention<expect, ct::stdcall_tag>(), "");
-    static_assert(!ct::has_calling_convention<expect, ct::fastcall_tag>(), "");
-
-    using g = ct::remove_calling_convention<f>;
-    using test = ct::add_calling_convention<g, ct::stdcall_tag>;
-
-    static_assert(ct::has_calling_convention<test, ct::stdcall_tag>(), "");
-    static_assert(std::is_same<test, expect>::value, "");
-}
-
-

- - Example - - __cdecl -

-
#define CALLABLE_TRAITS_ENABLE_CDECL
-
-#include <type_traits>
-#include <callable_traits/has_calling_convention.hpp>
-#include <callable_traits/add_calling_convention.hpp>
-
-namespace ct = callable_traits;
-
-struct foo {};
-
-int main() {
-
-    //depending on your platform, pmf may already have an implicit __cdecl
-    using pmf = void(foo::*)();
-    using expect = void(__cdecl foo::*)();
-    using test = ct::add_calling_convention<pmf, ct::cdecl_tag>;
-
-    static_assert(std::is_same<test, expect>::value, "");
-    static_assert(ct::has_calling_convention<expect, ct::cdecl_tag>(), "");
-    static_assert(ct::has_calling_convention<test, ct::cdecl_tag>(), "");
-}
-
-

- - See - Also -

- -
- - - -
-
-
-PrevUpHomeNext -
- - diff --git a/doc/html/callable_traits/ref_add_member_const.html b/doc/html/callable_traits/ref_add_member_const.html index bc8ef44..886835d 100644 --- a/doc/html/callable_traits/ref_add_member_const.html +++ b/doc/html/callable_traits/ref_add_member_const.html @@ -6,7 +6,7 @@ - + @@ -20,54 +20,230 @@
-PrevUpHomeNext +PrevUpHomeNext
-
namespace callable_traits {
+
namespace callable_traits {
 
     template<typename T>
-    using add_member_const = /* implementation-defined */;
+    struct add_member_const {
 
+        using type = //implementation-defined
+    };
+
+    template<typename T>
+    using add_member_const_t = typename add_member_const<T>::type;
 }
 

Constraints

-

- T must be a Function or MemberFunctionPtr. -

+
  • + T must be a function type + or a member function pointer +

Behavior

-
  • - Adds a const qualifier to - the signature of T (if - not already present), such that: -
      +
      • - add_member_const<int()> aliases int() const -
      • + Adds a member const qualifier + to T, if not already present +
      • - add_member_const<int(foo::*)() volatile> aliases int(foo::*)() const - volatile -
      • -
      -

    - Notes -

    -
    + Input/Output + Examples + +
    ++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +

    + T +

    +
    +

    + add_member_const_t<T> +

    +
    +

    + int() +

    +
    +

    + int() + const +

    +
    +

    + int(foo::*)() +

    +
    +

    + int(foo::*)() + const +

    +
    +

    + int(foo::*)() + & +

    +
    +

    + int(foo::*)() + const & +

    +
    +

    + int(foo::*)() + && +

    +
    +

    + int(foo::*)() + const && +

    +
    +

    + int(foo::*)() + const +

    +
    +

    + int(foo::*)() + const +

    +
    +

    + int(foo::*)() + volatile +

    +
    +

    + int(foo::*)() + const volatile +

    +
    +

    + int(foo::*)() + transaction_safe +

    +
    +

    + int(foo::*)() + const transaction_safe +

    +
    +

    + int +

    +
    +

    + (substitution failure) +

    +
    +

    + int (&)() +

    +
    +

    + (substitution failure) +

    +
    +

    + int (*)() +

    +
    +

    + (substitution failure) +

    +
    +

    + int foo::* +

    +
    +

    + (substitution failure) +

    +
    +

    + int (foo::* + const)() +

    +
    +

    + (substitution failure) +

    +
    +
  • +

- Example + Example + Program

#include <type_traits>
 #include <callable_traits/add_member_const.hpp>
@@ -109,19 +285,6 @@
     // or member data pointers.
 }
 
-

- - See - Also -

-
@@ -133,7 +296,7 @@

-PrevUpHomeNext +PrevUpHomeNext
diff --git a/doc/html/callable_traits/ref_add_member_cv.html b/doc/html/callable_traits/ref_add_member_cv.html index fb0dbec..76868fc 100644 --- a/doc/html/callable_traits/ref_add_member_cv.html +++ b/doc/html/callable_traits/ref_add_member_cv.html @@ -26,52 +26,223 @@ -
namespace callable_traits {
+
namespace callable_traits {
 
     template<typename T>
-    using add_member_cv = /* implementation-defined */;
+    struct add_member_cv {
 
+        using type = //implementation-defined
+    };
+
+    template<typename T>
+    using add_member_cv_t = typename add_member_cv<T>::type;
 }
 

Constraints

-

- T must be a Function or MemberFunctionPtr. -

+
  • + T must be a function type + or a member function pointer +

Behavior

  • - Adds both const and volatile qualifiers to the signature of - T (if not already present), - such that: -
      -
    • - add_member_cv<int()> - aliases int() - const volatile -
    • -
    • - add_member_cv<int(foo::*)() - volatile> - aliases int(foo::*)() - const volatile -
    • -
    + Adds member const and volatile qualifiers to T, + if not already present

- Notes + Input/Output + Examples

-
+
++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+ T +

+
+

+ add_member_cv_t<T> +

+
+

+ int() +

+
+

+ int() + const volatile +

+
+

+ int(foo::*)() +

+
+

+ int(foo::*)() + const volatile +

+
+

+ int(foo::*)() + & +

+
+

+ int(foo::*)() + const volatile + & +

+
+

+ int(foo::*)() + && +

+
+

+ int(foo::*)() + const volatile + && +

+
+

+ int(foo::*)() + const +

+
+

+ int(foo::*)() + const volatile +

+
+

+ int(foo::*)() + volatile +

+
+

+ int(foo::*)() + const volatile +

+
+

+ int(foo::*)() + transaction_safe +

+
+

+ int(foo::*)() + const volatile + transaction_safe +

+
+

+ int +

+
+

+ (substitution failure) +

+
+

+ int (&)() +

+
+

+ (substitution failure) +

+
+

+ int (*)() +

+
+

+ (substitution failure) +

+
+

+ int foo::* +

+
+

+ (substitution failure) +

+
+

+ int (foo::* + const)() +

+
+

+ (substitution failure) +

+

- Example + Example + Program

#include <type_traits>
 #include <callable_traits/add_member_cv.hpp>
@@ -114,25 +285,6 @@
 
 }
 
-

- - See - Also -

- diff --git a/doc/html/callable_traits/ref_add_member_lvalue_reference.html b/doc/html/callable_traits/ref_add_member_lvalue_reference.html index bcb2d2f..fa87030 100644 --- a/doc/html/callable_traits/ref_add_member_lvalue_reference.html +++ b/doc/html/callable_traits/ref_add_member_lvalue_reference.html @@ -26,61 +26,213 @@ -
namespace callable_traits {
+
namespace callable_traits {
 
     template<typename T>
-    using add_member_lvalue_reference = /* implementation-defined */;
+    struct add_member_lvalue_reference {
 
+        using type = //implementation-defined
+    };
+
+    template<typename T>
+    using add_member_lvalue_reference_t =
+        typename add_member_lvalue_reference<T>::type;
 }
 

Constraints

-

- T must be a Function or MemberFunctionPtr. -

+
  • + T must be a function type + or a member function pointer +

Behavior

  • - Adds an lvalue reference qualifier (&) - qualifier to the signature of T - (if not already present) + Adds a member lvalue reference qualifier (&) + to T, if not already present
  • If an rvalue reference qualifier is present, the lvalue reference qualifier - replaces it (in arbitrary accordance with reference collapsing rules) -
  • -
  • - Such that: -
      -
    • - add_member_lvalue_reference<int()> aliases int() & -
    • -
    • - add_member_lvalue_reference<int(foo::*)() const - &&> aliases int(foo::*)() - const & -
    • -
    • - add_member_lvalue_reference<int(foo::*)()> aliases int(foo::*)() & -
    • -
    + replaces it (in accordance with reference collapsing rules)

- Notes + Input/Output + Examples

-
+
++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+ T +

+
+

+ add_member_lvalue_reference_t<T> +

+
+

+ int() +

+
+

+ int() + & +

+
+

+ int(foo::*)() +

+
+

+ int(foo::*)() + & +

+
+

+ int(foo::*)() + & +

+
+

+ int(foo::*)() + & +

+
+

+ int(foo::*)() + && +

+
+

+ int(foo::*)() + & +

+
+

+ int(foo::*)() + const +

+
+

+ int(foo::*)() + const & +

+
+

+ int(foo::*)() + transaction_safe +

+
+

+ int(foo::*)() + & transaction_safe +

+
+

+ int +

+
+

+ (substitution failure) +

+
+

+ int (&)() +

+
+

+ (substitution failure) +

+
+

+ int (*)() +

+
+

+ (substitution failure) +

+
+

+ int foo::* +

+
+

+ (substitution failure) +

+
+

+ int (foo::* + const)() +

+
+

+ (substitution failure) +

+

- Example + Example + Program

#include <type_traits>
 #include <callable_traits/add_member_lvalue_reference.hpp>
@@ -125,21 +277,6 @@
     // or member data pointers.
 }
 
-

- - See Also -

- diff --git a/doc/html/callable_traits/ref_add_member_rvalue_reference.html b/doc/html/callable_traits/ref_add_member_rvalue_reference.html index 9831e9b..7833f37 100644 --- a/doc/html/callable_traits/ref_add_member_rvalue_reference.html +++ b/doc/html/callable_traits/ref_add_member_rvalue_reference.html @@ -7,7 +7,7 @@ - +
@@ -20,67 +20,219 @@

-PrevUpHomeNext +PrevUpHomeNext
-
namespace callable_traits {
+
namespace callable_traits {
 
     template<typename T>
-    using add_member_rvalue_reference = /* implementation-defined */;
+    struct add_member_rvalue_reference {
 
+        using type = //implementation-defined
+    };
+
+    template<typename T>
+    using add_member_rvalue_reference_t =
+        typename add_member_rvalue_reference<T>::type;
 }
 

Constraints

-

- T must be a Function or MemberFunctionPtr. -

+
  • + T must be a function type + or a member function pointer +

Behavior

  • - Adds an rvalue reference qualifier (&&) - qualifier to the signature of T - (if not already present) + Adds a member rvalue reference qualifier (&&) + to T, if not already present
  • If an lvalue reference qualifier is present, the lvalue reference qualifier - remains (in arbitrary accordance with reference collapsing rules) -
  • -
  • - Such that: -
      -
    • - add_member_rvalue_reference<int()> aliases int() && -
    • -
    • - add_member_rvalue_reference<int(foo::*)() const - &> aliases int(foo::*)() - const & -
    • -
    • - add_member_rvalue_reference<int(foo::*)()> aliases int(foo::*)() && -
    • -
    + remains (in accordance with reference collapsing rules)

- Notes + Input/Output + Examples

-
+
++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+ T +

+
+

+ add_member_rvalue_reference_t<T> +

+
+

+ int() +

+
+

+ int() + && +

+
+

+ int(foo::*)() +

+
+

+ int(foo::*)() + && +

+
+

+ int(foo::*)() + & +

+
+

+ int(foo::*)() + & +

+
+

+ int(foo::*)() + && +

+
+

+ int(foo::*)() + && +

+
+

+ int(foo::*)() + const +

+
+

+ int(foo::*)() + const && +

+
+

+ int(foo::*)() + transaction_safe +

+
+

+ int(foo::*)() + && transaction_safe +

+
+

+ int +

+
+

+ (substitution failure) +

+
+

+ int (&)() +

+
+

+ (substitution failure) +

+
+

+ int (*)() +

+
+

+ (substitution failure) +

+
+

+ int foo::* +

+
+

+ (substitution failure) +

+
+

+ int (foo::* + const)() +

+
+

+ (substitution failure) +

+

- Example + Example + Program

#include <type_traits>
 #include <callable_traits/add_member_rvalue_reference.hpp>
@@ -125,18 +277,6 @@
     // or member data pointers.
 }
 
-

- - See Also -

-
@@ -148,7 +288,7 @@

-PrevUpHomeNext +PrevUpHomeNext
diff --git a/doc/html/callable_traits/ref_add_member_volatile.html b/doc/html/callable_traits/ref_add_member_volatile.html index 653a498..0aef633 100644 --- a/doc/html/callable_traits/ref_add_member_volatile.html +++ b/doc/html/callable_traits/ref_add_member_volatile.html @@ -6,8 +6,8 @@ - - + + @@ -20,57 +20,211 @@

-PrevUpHomeNext +PrevUpHomeNext
-
namespace callable_traits {
+
namespace callable_traits {
 
     template<typename T>
-    using add_member_volatile = /* implementation-defined */;
+    struct add_member_volatile {
 
+        using type = //implementation-defined
+    };
+
+    template<typename T>
+    using add_member_volatile_t = typename add_member_volatile<T>::type;
 }
 

Constraints

-

- T must be a Function or MemberFunctionPtr. -

+
  • + T must be a function type + or a member function pointer +

Behavior

  • - Adds a volatile qualifier - to the signature of T (if - not already present), such that: -
      -
    • - add_member_volatile<int()> aliases int() volatile -
    • -
    • - add_member_volatile<int(foo::*)() const> aliases int(foo::*)() const - volatile -
    • -
    • - add_member_volatile<int(foo::*)()> aliases int(foo::*)() volatile -
    • -
    + Adds a member volatile qualifier to T + (if not already present)

- Notes + Input/Output + Examples

-
+
++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+ T +

+
+

+ add_member_volatile_t<T> +

+
+

+ int() +

+
+

+ int() + volatile +

+
+

+ int(foo::*)() +

+
+

+ int(foo::*)() + volatile +

+
+

+ int(foo::*)() + & +

+
+

+ int(foo::*)() + volatile & +

+
+

+ int(foo::*)() + && +

+
+

+ int(foo::*)() + volatile && +

+
+

+ int(foo::*)() + const +

+
+

+ int(foo::*)() + const volatile +

+
+

+ int(foo::*)() + transaction_safe +

+
+

+ int(foo::*)() + volatile transaction_safe +

+
+

+ int +

+
+

+ (substitution failure) +

+
+

+ int (&)() +

+
+

+ (substitution failure) +

+
+

+ int (*)() +

+
+

+ (substitution failure) +

+
+

+ int foo::* +

+
+

+ (substitution failure) +

+
+

+ int (foo::* + const)() +

+
+

+ (substitution failure) +

+

- Example + Example Program

#include <type_traits>
 #include <callable_traits/add_member_volatile.hpp>
@@ -112,19 +266,6 @@
     // function objects, or member data pointers.
 }
 
-

- - See - Also -

-
@@ -136,7 +277,7 @@

-PrevUpHomeNext +PrevUpHomeNext
diff --git a/doc/html/callable_traits/ref_add_transaction_safe.html b/doc/html/callable_traits/ref_add_transaction_safe.html new file mode 100644 index 0000000..6cee620 --- /dev/null +++ b/doc/html/callable_traits/ref_add_transaction_safe.html @@ -0,0 +1,274 @@ + + + +add_transaction_safe + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +
namespace callable_traits {
+
+    template<typename T>
+    struct add_transaction_safe {
+
+        using type = //implementation-defined
+    };
+
+    template<typename T>
+    using add_transaction_safe_t =
+        typename add_transaction_safe<T>::type;
+}
+
+

+ + Constraints +

+
  • + T must be one of the following: +
      +
    • + function type +
    • +
    • + function pointer +
    • +
    • + function reference +
    • +
    • + member function pointer +
    • +
    +
+

+ + Behavior +

+
  • + Adds a transaction_safe + specifier to T (if not + already present) +
+

+ + Input/Output + Examples +

+
++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+ T +

+
+

+ add_transaction_safe_t<T> +

+
+

+ int() +

+
+

+ int() + transaction_safe +

+
+

+ int (&)() +

+
+

+ int(&)() + transaction_safe +

+
+

+ int (*)() +

+
+

+ int(*)() + transaction_safe +

+
+

+ int(foo::*)() +

+
+

+ int(foo::*)() + transaction_safe +

+
+

+ int(foo::*)() + & +

+
+

+ int(foo::*)() + & transaction_safe +

+
+

+ int(foo::*)() + && +

+
+

+ int(foo::*)() + && transaction_safe +

+
+

+ int(foo::*)() + const +

+
+

+ int(foo::*)() + const transaction_safe +

+
+

+ int(foo::*)() + transaction_safe +

+
+

+ int(foo::*)() + transaction_safe +

+
+

+ int +

+
+

+ (substitution failure) +

+
+

+ int foo::* +

+
+

+ (substitution failure) +

+
+

+ int (*&)() +

+
+

+ (substitution failure) +

+
+

+ + Example + Program +

+
#include <type_traits>
+#include <callable_traits/add_transaction_safe.hpp>
+
+using callable_traits::add_transaction_safe_t;
+using std::is_same_v;
+
+using not_safe = int();
+using safe = int() transaction_safe;
+using safe_added = add_transaction_safe_t<not_safe>;
+
+static_assert(is_same_v<safe, safe_added>, "");
+
+int main() {}
+
+
+ + + +
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/html/callable_traits/ref_add_varargs.html b/doc/html/callable_traits/ref_add_varargs.html index 30a5c8b..82b387e 100644 --- a/doc/html/callable_traits/ref_add_varargs.html +++ b/doc/html/callable_traits/ref_add_varargs.html @@ -6,8 +6,8 @@ - - + + @@ -20,7 +20,7 @@

-PrevUpHomeNext +PrevUpHomeNext

@@ -30,7 +30,6 @@ template<typename T> using add_varargs = /* implementation-defined */; - }

@@ -42,16 +41,16 @@

@@ -85,13 +84,6 @@

- Notes -

-
-

- Example

#include <type_traits>
@@ -146,22 +138,6 @@
     //   type_value<invalid_type, false>, add_varargs_t_error<0> >'
 }
 
-

- - See - Also -

- @@ -173,7 +149,7 @@

-PrevUpHomeNext +PrevUpHomeNext
diff --git a/doc/html/callable_traits/ref_apply_member_pointer.html b/doc/html/callable_traits/ref_apply_member_pointer.html index bcd2843..0767431 100644 --- a/doc/html/callable_traits/ref_apply_member_pointer.html +++ b/doc/html/callable_traits/ref_apply_member_pointer.html @@ -6,7 +6,7 @@ - + @@ -20,7 +20,7 @@
-PrevUpHomeNext +PrevUpHomeNext

@@ -42,16 +42,16 @@

@@ -63,9 +63,8 @@ When the constraints are violated, a substitution failure occurs.
  • - Otherwise, apply_member_pointer<T, Class> aliases [Return] - ( [CallingConvention] Class::* ) ( [Args...] - [VarArgs] ) [MemberQualifiers] + Otherwise, apply_member_pointer<T, Class> aliases [Return] ( [CallingConvention] + Class::* ) ( [Args] [VarArgs] ) [MemberQualifiers]
  • @@ -99,14 +98,6 @@ } } -

    - - See - Also -

    -
    @@ -118,7 +109,7 @@

    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/callable_traits/ref_apply_return.html b/doc/html/callable_traits/ref_apply_return.html index 812dedb..1d2f9a1 100644 --- a/doc/html/callable_traits/ref_apply_return.html +++ b/doc/html/callable_traits/ref_apply_return.html @@ -38,7 +38,8 @@ Constraints

    - T must be a Signature or a MemberDataPtr. + T must be a [link_signature] + or a [link_pmd].

    @@ -46,8 +47,7 @@

    • apply_return<T, NewReturn> aliases NewReturn - [Category] ( [Args...] - [VarArgs] ) [MemberQualifiers] + [Category] ( [Args] [VarArgs] ) [MemberQualifiers]

    diff --git a/doc/html/callable_traits/ref_arg_at.html b/doc/html/callable_traits/ref_arg_at.html index f9e610d..0e5ac69 100644 --- a/doc/html/callable_traits/ref_arg_at.html +++ b/doc/html/callable_traits/ref_arg_at.html @@ -42,15 +42,16 @@ T must be one of the following:
  • - When T is a Signature, then: + When T is a [link_signature], + then:
    • Let ArgCount represent @@ -65,8 +66,7 @@
    • Otherwise, when T is a - SimpleFunctionObject, - then: + [link_simple_fn_obj], then:
      • Let ArgCount represent @@ -90,7 +90,7 @@
      • Otherwise, arg_at<Index, T> - aliases std::tuple_element_t<Index, callable_traits::args<T>>, such that: + aliases std::tuple_element_t<Index, callable_traits::[link_args]<T>>, such that:
        diff --git a/doc/html/callable_traits/ref_args.html b/doc/html/callable_traits/ref_args.html index 6cc9224..8f0cba7 100644 --- a/doc/html/callable_traits/ref_args.html +++ b/doc/html/callable_traits/ref_args.html @@ -39,8 +39,7 @@

        T must be one of the following: - * Signature - * SimpleFunctionObject + * [link_signature] * [link_simple_fn_obj]

        @@ -52,8 +51,7 @@
      • Otherwise, when T is a - Signature, - then: + [link_signature], then:
      • diff --git a/doc/html/callable_traits/ref_clear_args.html b/doc/html/callable_traits/ref_clear_args.html index be5b933..dc25349 100644 --- a/doc/html/callable_traits/ref_clear_args.html +++ b/doc/html/callable_traits/ref_clear_args.html @@ -37,7 +37,7 @@ Constraints
        • - T must be a Signature + T must be a [link_signature]

        diff --git a/doc/html/callable_traits/ref_expand_args.html b/doc/html/callable_traits/ref_expand_args.html index f38185b..7fd6a6c 100644 --- a/doc/html/callable_traits/ref_expand_args.html +++ b/doc/html/callable_traits/ref_expand_args.html @@ -41,16 +41,16 @@ T must be one of the following:
      • Let std::tuple<Args...> - represent callable_traits::args<T> + represent callable_traits::[link_args]<T>
        • Container<Args...> must be a legal template instantiation. @@ -73,7 +73,7 @@
          • Let std::tuple<Args...> - represent callable_traits::args<T> + represent callable_traits::[link_args]<T>
          • expand_args<T, Container> @@ -108,10 +108,10 @@
      • diff --git a/doc/html/callable_traits/ref_function_type.html b/doc/html/callable_traits/ref_function_type.html index 4be7d4d..3ef8796 100644 --- a/doc/html/callable_traits/ref_function_type.html +++ b/doc/html/callable_traits/ref_function_type.html @@ -37,7 +37,7 @@ Constraints

        - T must be a SimpleCallable. + T must be a [link_simple_callable].

        @@ -45,9 +45,8 @@

        function_type is used to "decay" - a SimpleCallable - into an INVOKE-aware - UnqualifiedFunction. + a [link_simple_callable] into an INVOKE-aware + [link_simple_fn].

        • @@ -56,8 +55,7 @@
        • Otherwise, when T is a - MemberFunctionPtr, - then: + [link_pmf], then:
          • Let Args... @@ -101,8 +99,7 @@
          • Otherwise, when T is a - MemberDataPtr, - then: + [link_pmd], then:
            • Let ClassRef represent @@ -130,7 +127,7 @@
            • Otherwise, when T is a - Signature: + [link_signature]:
              • Let Args... @@ -148,8 +145,7 @@
              • Otherwise, when T is a - SimpleFunctionObject, - then: + [link_simple_fn_obj], then:
        diff --git a/doc/html/callable_traits/ref_has_calling_convention.html b/doc/html/callable_traits/ref_has_calling_convention.html index 943ff47..6346b50 100644 --- a/doc/html/callable_traits/ref_has_calling_convention.html +++ b/doc/html/callable_traits/ref_has_calling_convention.html @@ -45,10 +45,11 @@

        @@ -106,48 +107,9 @@ Example - __fastcall to __stdcall

        -
        #define CALLABLE_TRAITS_ENABLE_STDCALL
        -#define CALLABLE_TRAITS_ENABLE_FASTCALL
        -
        -#include <type_traits>
        -#include <callable_traits/has_calling_convention.hpp>
        -#include <callable_traits/add_calling_convention.hpp>
        -#include <callable_traits/remove_calling_convention.hpp>
        -
        -namespace ct = callable_traits;
        -
        -int main() {
        -
        -    using f = void(__fastcall *)(int);
        -
        -    static_assert(ct::has_calling_convention<f, ct::fastcall_tag>(), "");
        -    static_assert(!ct::has_calling_convention<f, ct::stdcall_tag>(), "");
        -
        -    using expect = void(__stdcall *)(int);
        -
        -    static_assert(ct::has_calling_convention<expect, ct::stdcall_tag>(), "");
        -    static_assert(!ct::has_calling_convention<expect, ct::fastcall_tag>(), "");
        -
        -    using g = ct::remove_calling_convention<f>;
        -    using test = ct::add_calling_convention<g, ct::stdcall_tag>;
        -
        -    static_assert(ct::has_calling_convention<test, ct::stdcall_tag>(), "");
        -    static_assert(std::is_same<test, expect>::value, "");
        -}
        -
        -

        - - See - Also -

        - +

        + [experimental_changing_calling_conventions] +

        diff --git a/doc/html/callable_traits/ref_has_varargs.html b/doc/html/callable_traits/ref_has_varargs.html index 10f5f8e..5e6aad1 100644 --- a/doc/html/callable_traits/ref_has_varargs.html +++ b/doc/html/callable_traits/ref_has_varargs.html @@ -44,7 +44,7 @@ Constraints

        @@ -55,7 +55,7 @@ If the constraints are violated, a substitution failure occurs
      • - Otherwise, if T is a Signature, + Otherwise, if T is a [link_signature], then:
        • @@ -70,7 +70,7 @@
      • - Otherwise, if T is a SimpleFunctionObject, + Otherwise, if T is a [link_simple_fn_obj], then:
      • diff --git a/doc/html/callable_traits/ref_insert_args.html b/doc/html/callable_traits/ref_insert_args.html index 15f334d..a31e933 100644 --- a/doc/html/callable_traits/ref_insert_args.html +++ b/doc/html/callable_traits/ref_insert_args.html @@ -37,7 +37,7 @@ Constraints
        • - T must be a Signature + T must be a [link_signature]

        @@ -45,13 +45,12 @@

        • - insert_args<Index, T, NewArgs...> aliases a type identical to T, except that NewArgs... will be inserted into the [Args...] - parameter list at the 0-based InsertIndex. + insert_args<Index, T, NewArgs...> aliases a type identical to T, except that NewArgs... will be inserted into the [Args] parameter + list at the 0-based InsertIndex. TODO document out-of-bounds behavior
        • - [VarArgs] remain if present in - T. + [VarArgs] remain if present in T.

        diff --git a/doc/html/callable_traits/ref_pop_back.html b/doc/html/callable_traits/ref_pop_back.html deleted file mode 100644 index 41dc3f3..0000000 --- a/doc/html/callable_traits/ref_pop_back.html +++ /dev/null @@ -1,62 +0,0 @@ - - - -pop_back - - - - - - - - -

        - - - - - - -
        Boost C++ LibrariesHomeLibrariesPeopleFAQMore
        -
        -
        -PrevUpHomeNext -
        -
        - -

        - TODO -

        -

        - - Example -

        -
        #include <callable_traits/pop_back.hpp>
        -
        -namespace ct = callable_traits;
        -
        -int main() {
        -
        -    using f = void(*)(int, char);
        -    using test = ct::args_pop_back_t<f>;
        -    using expect = void(*)(int);
        -    static_assert(std::is_same<test, expect>::value, "");
        -}
        -
        -
        - - - -
        -
        -
        -PrevUpHomeNext -
        - - diff --git a/doc/html/callable_traits/ref_pop_back_args.html b/doc/html/callable_traits/ref_pop_back_args.html new file mode 100644 index 0000000..3db009d --- /dev/null +++ b/doc/html/callable_traits/ref_pop_back_args.html @@ -0,0 +1,53 @@ + + + +pop_back_args + + + + + + + + + + + + + + + +
        Boost C++ LibrariesHomeLibrariesPeopleFAQMore
        +
        +
        +PrevUpHomeNext +
        +
        + +

        + TODO +

        +

        + + Example +

        +

        + [pop_back_args] +

        +
        + + + +
        +
        +
        +PrevUpHomeNext +
        + + diff --git a/doc/html/callable_traits/ref_push_back.html b/doc/html/callable_traits/ref_push_back.html deleted file mode 100644 index 150dcca..0000000 --- a/doc/html/callable_traits/ref_push_back.html +++ /dev/null @@ -1,85 +0,0 @@ - - - -push_back - - - - - - - - - - - - - - - -
        Boost C++ LibrariesHomeLibrariesPeopleFAQMore
        -
        -
        -PrevUpHomeNext -
        -
        - -
        namespace callable_traits {
        -
        -    template<typename T, typename... NewArgs>
        -    using push_back = /* implementation-defined */;
        -}
        -
        -

        - - Constraints -

        -
        -

        - - Behavior -

        -
          -
        • - push_back<T, NewArgs...> aliases a type identical to T, except that NewArgs... have been appended to the back of T's parameter list [Args...]. -
        • -
        • - [VarArgs] remain if present in - T. -
        • -
        -

        - - Example -

        -
        #include <callable_traits/push_back.hpp>
        -
        -namespace ct = callable_traits;
        -
        -int main() {
        -
        -    using f = void(int, char);
        -    using test = ct::args_push_back_t<f, long, void*>;
        -    using expect = void(int, char, long, void*);
        -    static_assert(std::is_same<test, expect>::value, "");
        -}
        -
        -
        - - - -
        -
        -
        -PrevUpHomeNext -
        - - diff --git a/doc/html/callable_traits/ref_push_back_args.html b/doc/html/callable_traits/ref_push_back_args.html new file mode 100644 index 0000000..7d9d46a --- /dev/null +++ b/doc/html/callable_traits/ref_push_back_args.html @@ -0,0 +1,75 @@ + + + +push_back_args + + + + + + + + + + + + + + + +
        Boost C++ LibrariesHomeLibrariesPeopleFAQMore
        +
        +
        +PrevUpHomeNext +
        +
        + +
        namespace callable_traits {
        +
        +    template<typename T, typename... NewArgs>
        +    using push_back_args = /* implementation-defined */;
        +}
        +
        +

        + + Constraints +

        +
        • + T must be a [link_signature] +
        +

        + + Behavior +

        +
          +
        • + push_back_args<T, NewArgs...> aliases a type identical to T, except that NewArgs... have been appended to the back of T's parameter list [Args]. +
        • +
        • + [VarArgs] remain if present in T. +
        • +
        +

        + + Example +

        +

        + [push_back_args] +

        +
        + + + +
        +
        +
        +PrevUpHomeNext +
        + + diff --git a/doc/html/callable_traits/ref_push_front.html b/doc/html/callable_traits/ref_push_front.html deleted file mode 100644 index b22db0c..0000000 --- a/doc/html/callable_traits/ref_push_front.html +++ /dev/null @@ -1,86 +0,0 @@ - - - -push_front - - - - - - - - - - - - - - - -
        Boost C++ LibrariesHomeLibrariesPeopleFAQMore
        -
        -
        -PrevUpHomeNext -
        -
        - -
        namespace callable_traits {
        -
        -    template<typename T, typename... NewArgs>
        -    using push_front = /* implementation-defined */;
        -}
        -
        -

        - - Constraints -

        -
        -

        - - Behavior -

        -
          -
        • - push_back<T, NewArgs...> aliases a type identical to T, except that NewArgs... have been appended to the front of - T's parameter list [Args...]. -
        • -
        • - [VarArgs] remain if present in - T. -
        • -
        -

        - - Example -

        -
        #include <callable_traits/push_front.hpp>
        -
        -namespace ct = callable_traits;
        -
        -int main() {
        -
        -    using f = void(int, char);
        -    using test = ct::args_push_front_t<f, long, void*>;
        -    using expect = void(long, void*, int, char);
        -    static_assert(std::is_same<test, expect>::value, "");
        -}
        -
        -
        - - - -
        -
        -
        -PrevUpHomeNext -
        - - diff --git a/doc/html/callable_traits/ref_push_front_args.html b/doc/html/callable_traits/ref_push_front_args.html new file mode 100644 index 0000000..664b4fd --- /dev/null +++ b/doc/html/callable_traits/ref_push_front_args.html @@ -0,0 +1,76 @@ + + + +push_front_args + + + + + + + + + + + + + + + +
        Boost C++ LibrariesHomeLibrariesPeopleFAQMore
        +
        +
        +PrevUpHomeNext +
        +
        + +
        namespace callable_traits {
        +
        +    template<typename T, typename... NewArgs>
        +    using push_front_args = /* implementation-defined */;
        +}
        +
        +

        + + Constraints +

        +
        • + T must be a [link_signature] +
        +

        + + Behavior +

        +
          +
        • + push_back_args<T, NewArgs...> aliases a type identical to T, except that NewArgs... have been appended to the front of + T's parameter list [Args]. +
        • +
        • + [VarArgs] remain if present in T. +
        • +
        +

        + + Example +

        +

        + [push_front_args] +

        +
        + + + +
        +
        +
        +PrevUpHomeNext +
        + + diff --git a/doc/html/callable_traits/ref_push_front0.html b/doc/html/callable_traits/ref_push_front_args0.html similarity index 74% rename from doc/html/callable_traits/ref_push_front0.html rename to doc/html/callable_traits/ref_push_front_args0.html index f62833d..f35e6d3 100644 --- a/doc/html/callable_traits/ref_push_front0.html +++ b/doc/html/callable_traits/ref_push_front_args0.html @@ -1,12 +1,12 @@ -pop_front +pop_front_args - + @@ -20,20 +20,20 @@
        -PrevUpHomeNext +PrevUpHomeNext

        TODO

        - - Example + + Example

        -
        #include <callable_traits/pop_front.hpp>
        +
        #include <callable_traits/pop_front_args.hpp>
         
         namespace ct = callable_traits;
         
        @@ -42,7 +42,7 @@
         int main() {
         
             using f = void(foo::*)(int, char, long);
        -    using test = ct::args_pop_front_t<f>;
        +    using test = ct::pop_front_args_t<f>;
             using expect = void(foo::*)(char, long);
             static_assert(std::is_same<test, expect>::value, "");
         }
        @@ -58,7 +58,7 @@
         
         
        -PrevUpHomeNext +PrevUpHomeNext
        diff --git a/doc/html/callable_traits/ref_remove_args.html b/doc/html/callable_traits/ref_remove_args.html index cd1d4cf..dc596b5 100644 --- a/doc/html/callable_traits/ref_remove_args.html +++ b/doc/html/callable_traits/ref_remove_args.html @@ -37,7 +37,7 @@ Constraints
    • - T must be a Signature + T must be a [link_signature]

    @@ -51,8 +51,7 @@ 0-based Index to Index + Count. TODO document out-of-bounds behavior
  • - [VarArgs] remain if present in - T. + [VarArgs] remain if present in T.
  • diff --git a/doc/html/callable_traits/ref_remove_calling_convention.html b/doc/html/callable_traits/ref_remove_calling_convention.html index 0235867..636db31 100644 --- a/doc/html/callable_traits/ref_remove_calling_convention.html +++ b/doc/html/callable_traits/ref_remove_calling_convention.html @@ -34,35 +34,9 @@ Example - __fastcall to __stdcall

    -
    #define CALLABLE_TRAITS_ENABLE_STDCALL
    -#define CALLABLE_TRAITS_ENABLE_FASTCALL
    -
    -#include <type_traits>
    -#include <callable_traits/has_calling_convention.hpp>
    -#include <callable_traits/add_calling_convention.hpp>
    -#include <callable_traits/remove_calling_convention.hpp>
    -
    -namespace ct = callable_traits;
    -
    -int main() {
    -
    -    using f = void(__fastcall *)(int);
    -
    -    static_assert(ct::has_calling_convention<f, ct::fastcall_tag>(), "");
    -    static_assert(!ct::has_calling_convention<f, ct::stdcall_tag>(), "");
    -
    -    using expect = void(__stdcall *)(int);
    -
    -    static_assert(ct::has_calling_convention<expect, ct::stdcall_tag>(), "");
    -    static_assert(!ct::has_calling_convention<expect, ct::fastcall_tag>(), "");
    -
    -    using g = ct::remove_calling_convention<f>;
    -    using test = ct::add_calling_convention<g, ct::stdcall_tag>;
    -
    -    static_assert(ct::has_calling_convention<test, ct::stdcall_tag>(), "");
    -    static_assert(std::is_same<test, expect>::value, "");
    -}
    -
    +

    + [experimental_changing_calling_conventions] +

    diff --git a/doc/html/callable_traits/ref_remove_member_volatile.html b/doc/html/callable_traits/ref_remove_member_volatile.html index 66de21f..d193e87 100644 --- a/doc/html/callable_traits/ref_remove_member_volatile.html +++ b/doc/html/callable_traits/ref_remove_member_volatile.html @@ -7,7 +7,7 @@ - +
    @@ -20,7 +20,7 @@

    -PrevUpHomeNext +PrevUpHomeNext

    @@ -47,7 +47,7 @@
    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/callable_traits/ref_replace_args.html b/doc/html/callable_traits/ref_replace_args.html index 5a67f51..aecd78e 100644 --- a/doc/html/callable_traits/ref_replace_args.html +++ b/doc/html/callable_traits/ref_replace_args.html @@ -37,7 +37,7 @@ Constraints

    • - T must be a Signature + T must be a [link_signature]

    @@ -45,13 +45,12 @@

    • - replace_args<Index, T, NewArgs...> aliases a type identical to T, except that NewArgs... will begin overwriting the [Args...] - parameter list at the 0-based InsertIndex, + replace_args<Index, T, NewArgs...> aliases a type identical to T, except that NewArgs... will begin overwriting the [Args] parameter + list at the 0-based InsertIndex, extending the parameter list as necessary.
    • - [VarArgs] remain if present in - T. + [VarArgs] remain if present in T.

    diff --git a/doc/html/callable_traits/ref_result_of.html b/doc/html/callable_traits/ref_result_of.html index 65ac95b..223c634 100644 --- a/doc/html/callable_traits/ref_result_of.html +++ b/doc/html/callable_traits/ref_result_of.html @@ -6,7 +6,7 @@ - + @@ -20,7 +20,7 @@
    -PrevUpHomeNext +PrevUpHomeNext

    @@ -72,7 +72,7 @@
    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/callable_traits_interface_example.html b/doc/html/callable_traits_interface_example.html index 81edf3b..2803d12 100644 --- a/doc/html/callable_traits_interface_example.html +++ b/doc/html/callable_traits_interface_example.html @@ -274,14 +274,13 @@

    #include <callable_traits/arg_at.hpp>
     #include <callable_traits/result_of.hpp>
    -#include <callable_traits/pop_front.hpp>
    -#include <callable_traits/push_front.hpp>
    +#include <callable_traits/pop_front_args.hpp>
    +#include <callable_traits/push_front_args.hpp>
     #include <callable_traits/expand_args.hpp>
     #include <callable_traits/replace_args.hpp>
     #include <callable_traits/function_type.hpp>
     #include <callable_traits/set_qualifiers.hpp>
     #include <callable_traits/qualifier_flags.hpp>
    -#include <callable_traits/copy_qualifiers.hpp>
     #include <callable_traits/is_like_function.hpp>
     #include <callable_traits/remove_member_cv.hpp>
     #include <callable_traits/get_qualifier_flags.hpp>
    @@ -605,7 +604,7 @@
                 typename interface_root::vtable::pmf0>;
     
             using impl = ::intrfc::ct::expand_args_t<
    -            ::intrfc::ct::args_pop_front_t<function_type>,
    +            ::intrfc::ct::pop_front_args_t<function_type>,
                 base_impl0>;
     
             using qualifiers =
    @@ -682,7 +681,7 @@
                 typename interface_root::vtable::pmf1>;
     
             using impl = ::intrfc::ct::expand_args_t<
    -            ::intrfc::ct::args_pop_front_t<function_type>,
    +            ::intrfc::ct::pop_front_args_t<function_type>,
                 base_impl1>;
     
             using qualifiers =
    @@ -903,7 +902,7 @@
             typename interface_root::vtable::BOOST_PP_CAT(pmf, i)>;        \
                                                                            \
         using impl = ::intrfc::ct::expand_args_t<                          \
    -        ::intrfc::ct::args_pop_front_t<function_type>,                 \
    +        ::intrfc::ct::pop_front_args_t<function_type>,                 \
             BOOST_PP_CAT(base_impl, i)>;                                   \
                                                                            \
         using qualifiers =                                                 \
    diff --git a/doc/html/index.html b/doc/html/index.html
    index 02e62d6..8fdb4c5 100644
    --- a/doc/html/index.html
    +++ b/doc/html/index.html
    @@ -47,66 +47,22 @@
           Boost.FunctionTypes
     
     
    Compatibility
    -
    Known - Issues
    FAQ
    Why should I use CallableTraits?
    -
    What makes CallableTraits - unique?
    -
    Why not update - and extend Boost.FunctionTypes instead?
    Why does callable_traits::args alias a std::tuple?
    -
    Why - are the CallableTraits alias templates not suffixed with - _t, as in std::add_lvalue_reference_t?
    -
    Why - use constexpr function templates? Why not use something like std::is_same - or even std::is_same_v?
    Why use reference collapsing rules when adding member function ref-qualifiers?
    -
    Development
    -
    Building the test - suite
    -
    Glossary
    -
    -
    FunctionPtr
    -
    FunctionReference
    -
    UnqualifiedFunction
    -
    AbominableFunction
    -
    Function
    -
    MemberFunctionPtr
    -
    MemberDataPtr
    -
    MemberPtr
    -
    SimpleFunctionObject
    -
    OverloadedFunctionObject
    -
    FunctionObject
    -
    Signature
    -
    Callable
    -
    SimpleCallable
    -
    SimpleInvokable
    -
    Invokable
    -
    CallingConventionTag
    -
    -
    Headers
    -
    -
    Qualifiers
    -
    Parameters - and Return Types
    -
    Member Pointers
    -
    Variadics
    -
    Calling - Conventions (experimental)
    -
    -
    add_calling_convention
    +
    Building the test suite
    add_member_const
    add_member_cv
    add_member_lvalue_reference
    add_member_rvalue_reference
    -
    add_varargs
    add_member_volatile
    +
    add_transaction_safe
    +
    add_varargs
    apply_member_pointer
    apply_return
    arg_at
    @@ -134,10 +90,10 @@
    remove_member_reference
    remove_varargs
    remove_member_volatile
    -
    push_back
    -
    push_front
    -
    pop_back
    -
    pop_front
    +
    push_back_args
    +
    push_front_args
    +
    pop_back_args
    +
    pop_front_args
    result_of
    Example: Java-style interfaces without inheritance
    Contact
    @@ -229,16 +185,16 @@

    Here are a few other trait examples:

    -
    static_assert(is_const_member<pmf>(), "");
    -static_assert(!is_volatile_member<pmf>(), "");
    -static_assert(!has_void_return<pmf>(), "");
    -static_assert(!has_varargs<pmf>(), "");
    +
    static_assert(is_const_member<pmf>{}, "");
    +static_assert(!is_volatile_member<pmf>{}, "");
    +static_assert(!has_void_return<pmf>{}, "");
    +static_assert(!has_varargs<pmf>{}, "");
     

    You can use CallableTraits to manipulate parameter lists (not defined in terms of INVOKE, since that wouldn't make sense here):

    -
    using pmf_2 = args_push_back_t<pmf, char, short, long>;
    +
    using pmf_2 = push_back_args_t<pmf, char, short, long>;
     
     static_assert(is_same<
         pmf_2,
    @@ -246,7 +202,7 @@
     >{}, "");
     
     static_assert(is_same<
    -    args_pop_front_t<pmf_2>,
    +    pop_front_args_t<pmf_2>,
         int(number::*)(char, short, long) const
     >{}, "");
     
    @@ -290,23 +246,16 @@
           for function types" mentioned in the last section of p0172,
           the C++17 proposal regarding "abominable function types". CallableTraits
           currently supports GCC 4.8 and later, Clang 3.5 and later, AppleClang from
    -      XCode 6.3 and later, and MSVC 19. CallableTraits is header-only,
    -      and does not depend on any non-standard headers.
    +      XCode 6.3 and later, and Visual Studio 2015.
    +    

    +

    + CallableTraits is header-only, and does not depend on any + headers outside the standard library.

    CallableTraits is currently hosted at GitHub. CallableTraits is not a Boost library.

    -
    - - - - - -
    [Note]Note

    - A few features are disabled for older/non-compliant compilers. See the Compatibility - Issues section for more details. -

    Prerequisite Topics @@ -493,53 +442,6 @@ versions.

    -
    - - - - - -
    [Note]Note

    - features for transaction_safe - are planned, but not yet implemented. -

    -
    - - - - - -
    [Warning]Warning
    -

    - Features for the manipulation and inspection of calling conventions are - optional, which must be enabled with macro definitions. The features regarding - them are currently classified as experimental, and - are subject to breaking changes in future versions of CallableTraits. -

    -

    - The rationale for classifying the calling convention features as "experimental" - is three-fold: -

    -
      -
    1. - Calling conventions are, by definition, highly platform-specific. -
    2. -
    3. - Each calling convention effectively doubles the test surface of CallableTraits - on every supported platform. Tests have not yet been written to account - for this. -
    4. -
    5. - The author's knowledge of cross-platform behavior of calling conventions - in C++ is limited. -
    6. -
    -

    - It is the author's hope that future versions of CallableTraits - will offer a stable, thoroughly-tested, and well-documented implementation - of these features. If you have experience in this domain, please contact the author. -

    -

    @@ -548,7 +450,7 @@

    The use cases for CallableTraits are closely related to - those of Boost.FunctionTypes. + those of Boost.FunctionTypes. Here are some reasons why you might prefer CallableTraits:

      @@ -574,23 +476,24 @@
    1. The Boost.FunctionTypes interface relies heavily on - tag types. CallableTraits does not (except for platform-specific - calling conventions). + tag types. CallableTraits does not.

    - By building on the achievements of others, CallableTraits - borrows and extends much of the functionality found in Boost.FunctionTypes, - re-packaging it in a more accessible type_traits-style - interface. There is nothing inherently wrong with Boost.FunctionTypes, - which is a great choice for projects already using the MPL, and for metaprogramming - on older compilers. However, an MPL sequence-based solution with no C++11 - support should not be the only option for inspecting and manipulating callable - types. + Boost.FunctionTypes is a good tool for projects already + dependent on the MPL, which must also support very old compilers. However, + the Boost.FunctionTypes interface is unpleasant. It relies + heavily on both the MPL and tag types, for problems that are more simply + solved with neither. Using Boost.FunctionTypes requires + an understanding of the library's "big picture."

    - See Also: Why not - update and extend Boost.FunctionTypes instead? + CallableTraits borrows and extends much of the functionality + found in Boost.FunctionTypes, re-packaging it in a more + accessible type_traits-style + interface. There is nothing inherently wrong with Boost.FunctionTypes, + but an MPL sequence-based solution with no C++11/14/17 support should not + be the only library option for inspecting and manipulating callable types.

    diff --git a/doc/html/standalone_HTML.manifest b/doc/html/standalone_HTML.manifest index 0fd9968..5f5bb34 100644 --- a/doc/html/standalone_HTML.manifest +++ b/doc/html/standalone_HTML.manifest @@ -1,16 +1,14 @@ index.html callable_traits/compatibility.html callable_traits/faq.html -callable_traits/development.html -callable_traits/glossary.html -callable_traits/headers.html -callable_traits/ref_add_calling_convention.html +callable_traits/building.html callable_traits/ref_add_member_const.html callable_traits/ref_add_member_cv.html callable_traits/ref_add_member_lvalue_reference.html callable_traits/ref_add_member_rvalue_reference.html -callable_traits/ref_add_varargs.html callable_traits/ref_add_member_volatile.html +callable_traits/ref_add_transaction_safe.html +callable_traits/ref_add_varargs.html callable_traits/ref_apply_member_pointer.html callable_traits/ref_apply_return.html callable_traits/ref_arg_at.html @@ -38,10 +36,10 @@ callable_traits/ref_remove_member_pointer.html callable_traits/ref_remove_member_reference.html callable_traits/ref_remove_varargs.html callable_traits/ref_remove_member_volatile.html -callable_traits/ref_push_back.html -callable_traits/ref_push_front.html -callable_traits/ref_pop_back.html -callable_traits/ref_push_front0.html +callable_traits/ref_push_back_args.html +callable_traits/ref_push_front_args.html +callable_traits/ref_pop_back_args.html +callable_traits/ref_push_front_args0.html callable_traits/ref_result_of.html callable_traits_interface_example.html callable_traits/contact.html diff --git a/example/add_transaction_safe.cpp b/example/add_transaction_safe.cpp new file mode 100644 index 0000000..9221859 --- /dev/null +++ b/example/add_transaction_safe.cpp @@ -0,0 +1,31 @@ +/*<- +Copyright (c) 2016 Barrett Adair + +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) +->*/ + +#include + +#ifndef CALLABLE_TRAITS_ENABLE_TRANSACTION_SAFE +int main(){} +#else + +//[ add_transaction_safe +#include +#include + +using callable_traits::add_transaction_safe_t; +using std::is_same_v; + +using not_safe = int(); +using safe = int() transaction_safe; +using safe_added = add_transaction_safe_t; + +static_assert(is_same_v, ""); + +int main() {} + +//] +#endif + diff --git a/example/interface.hpp b/example/interface.hpp index da417b1..0fe0636 100644 --- a/example/interface.hpp +++ b/example/interface.hpp @@ -8,8 +8,8 @@ #include #include -#include -#include +#include +#include #include #include #include @@ -338,7 +338,7 @@ struct interface_x_detail { typename interface_root::vtable::pmf0>; using impl = ::intrfc::ct::expand_args_t< - ::intrfc::ct::args_pop_front_t, + ::intrfc::ct::pop_front_args_t, base_impl0>; using qualifiers = @@ -415,7 +415,7 @@ struct interface_x_detail { typename interface_root::vtable::pmf1>; using impl = ::intrfc::ct::expand_args_t< - ::intrfc::ct::args_pop_front_t, + ::intrfc::ct::pop_front_args_t, base_impl1>; using qualifiers = @@ -636,7 +636,7 @@ struct base { \ typename interface_root::vtable::BOOST_PP_CAT(pmf, i)>; \ \ using impl = ::intrfc::ct::expand_args_t< \ - ::intrfc::ct::args_pop_front_t, \ + ::intrfc::ct::pop_front_args_t, \ BOOST_PP_CAT(base_impl, i)>; \ \ using qualifiers = \ diff --git a/example/overview.cpp b/example/overview.cpp index 1e6ecc2..5ed0007 100644 --- a/example/overview.cpp +++ b/example/overview.cpp @@ -90,7 +90,7 @@ static_assert(!has_varargs{}, ""); //` You can use [libname] to manipulate parameter lists (not defined in terms of INVOKE, since that wouldn't make sense here): -using pmf_2 = args_push_back_t; +using pmf_2 = push_back_args_t; static_assert(is_same< pmf_2, @@ -98,7 +98,7 @@ static_assert(is_same< >{}, ""); static_assert(is_same< - args_pop_front_t, + pop_front_args_t, int(number::*)(char, short, long) const >{}, ""); diff --git a/example/pop_back.cpp b/example/pop_back_args.cpp similarity index 81% rename from example/pop_back.cpp rename to example/pop_back_args.cpp index 3cf46ca..a220233 100644 --- a/example/pop_back.cpp +++ b/example/pop_back_args.cpp @@ -5,14 +5,14 @@ Distributed under the Boost Software License, Version 1.0. ->*/ //[ pop_back -#include +#include namespace ct = callable_traits; int main() { using f = void(*)(int, char); - using test = ct::args_pop_back_t; + using test = ct::pop_back_args_t; using expect = void(*)(int); static_assert(std::is_same::value, ""); } diff --git a/example/pop_front.cpp b/example/pop_front_args.cpp similarity index 78% rename from example/pop_front.cpp rename to example/pop_front_args.cpp index 4885f80..85af593 100644 --- a/example/pop_front.cpp +++ b/example/pop_front_args.cpp @@ -4,8 +4,8 @@ Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http ://boost.org/LICENSE_1_0.txt) ->*/ -//[ pop_front -#include +//[ pop_front_args +#include namespace ct = callable_traits; @@ -14,7 +14,7 @@ struct foo; int main() { using f = void(foo::*)(int, char, long); - using test = ct::args_pop_front_t; + using test = ct::pop_front_args_t; using expect = void(foo::*)(char, long); static_assert(std::is_same::value, ""); } diff --git a/example/push_back.cpp b/example/push_back_args.cpp similarity index 79% rename from example/push_back.cpp rename to example/push_back_args.cpp index e3a0b62..9170d9c 100644 --- a/example/push_back.cpp +++ b/example/push_back_args.cpp @@ -5,14 +5,14 @@ Distributed under the Boost Software License, Version 1.0. ->*/ //[ push_back -#include +#include namespace ct = callable_traits; int main() { using f = void(int, char); - using test = ct::args_push_back_t; + using test = ct::push_back_args_t; using expect = void(int, char, long, void*); static_assert(std::is_same::value, ""); } diff --git a/example/push_front.cpp b/example/push_front_args.cpp similarity index 75% rename from example/push_front.cpp rename to example/push_front_args.cpp index 7badf1b..9a1707f 100644 --- a/example/push_front.cpp +++ b/example/push_front_args.cpp @@ -4,15 +4,15 @@ Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http ://boost.org/LICENSE_1_0.txt) ->*/ -//[ push_front -#include +//[ agrs_push_front +#include namespace ct = callable_traits; int main() { using f = void(int, char); - using test = ct::args_push_front_t; + using test = ct::push_front_args_t; using expect = void(long, void*, int, char); static_assert(std::is_same::value, ""); } diff --git a/include/callable_traits/add_calling_convention.hpp b/include/callable_traits/add_calling_convention.hpp index df65ec2..933730f 100644 --- a/include/callable_traits/add_calling_convention.hpp +++ b/include/callable_traits/add_calling_convention.hpp @@ -1,5 +1,4 @@ -/*! -@file add_member_const +/* @copyright Barrett Adair 2015 Distributed under the Boost Software License, Version 1.0. diff --git a/include/callable_traits/add_member_const.hpp b/include/callable_traits/add_member_const.hpp index fa6d74a..f6bf226 100644 --- a/include/callable_traits/add_member_const.hpp +++ b/include/callable_traits/add_member_const.hpp @@ -1,5 +1,4 @@ -/*! -@file add_member_const +/* @copyright Barrett Adair 2015 Distributed under the Boost Software License, Version 1.0. @@ -12,18 +11,58 @@ Distributed under the Boost Software License, Version 1.0. #include +//[ add_member_const_hpp +//`[section:ref_add_member_const add_member_const] + namespace callable_traits { template struct add_member_const { - using type = detail::fail_if_invalid< - typename detail::traits::add_member_const, - member_qualifiers_are_illegal_for_this_type>; + using type = //implementation-defined + //<- + detail::fail_if_invalid< + typename detail::traits::add_member_const, + member_qualifiers_are_illegal_for_this_type>; + //-> }; template using add_member_const_t = typename add_member_const::type; } -#endif +/*` +[heading Constraints] +* `T` must be a function type or a member function pointer + +[heading Behavior] +* Adds a member `const` qualifier to `T`, if not already present +* +[heading Input/Output Examples] +[table + [[`T`] [`add_member_const_t`]] + [[`int()`] [`int() const`]] + [[`int(foo::*)()`] [`int(foo::*)() const`]] + [[`int(foo::*)() &`] [`int(foo::*)() const &`]] + [[`int(foo::*)() &&`] [`int(foo::*)() const &&`]] + [[`int(foo::*)() const`] [`int(foo::*)() const`]] + [[`int(foo::*)() volatile`] [`int(foo::*)() const volatile`]] + [[`int(foo::*)() transaction_safe`] [`int(foo::*)() const transaction_safe`]] + [[`int`] [(substitution failure)]] + [[`int (&)()`] [(substitution failure)]] + [[`int (*)()`] [(substitution failure)]] + [[`int foo::*`] [(substitution failure)]] + [[`int (foo::* const)()`] [(substitution failure)]] +] + +[heading Example Program] +[import ../example/add_member_const.cpp] +[add_member_const] +[endsect] +*/ +//] + +#endif //#ifndef CALLABLE_TRAITS_ADD_MEMBER_CONST_HPP + + + diff --git a/include/callable_traits/add_member_cv.hpp b/include/callable_traits/add_member_cv.hpp index 317958d..384a238 100644 --- a/include/callable_traits/add_member_cv.hpp +++ b/include/callable_traits/add_member_cv.hpp @@ -1,5 +1,4 @@ -/*! -@file +/* @copyright Barrett Adair 2015 Distributed under the Boost Software License, Version 1.0. @@ -12,18 +11,55 @@ Distributed under the Boost Software License, Version 1.0. #include +//[add_member_cv_hpp +//`[section:ref_add_member_cv add_member_cv] + namespace callable_traits { template struct add_member_cv { - using type = detail::fail_if_invalid< - typename detail::traits::add_member_cv, - member_qualifiers_are_illegal_for_this_type>; + using type = //implementation-defined + //<- + detail::fail_if_invalid< + typename detail::traits::add_member_cv, + member_qualifiers_are_illegal_for_this_type>; + //-> }; template using add_member_cv_t = typename add_member_cv::type; } +/*` +[heading Constraints] +* `T` must be a function type or a member function pointer + +[heading Behavior] +* Adds member `const` and `volatile` qualifiers to `T`, if not already present + +[heading Input/Output Examples] +[table + [[`T`] [`add_member_cv_t`]] + [[`int()`] [`int() const volatile`]] + [[`int(foo::*)()`] [`int(foo::*)() const volatile`]] + [[`int(foo::*)() &`] [`int(foo::*)() const volatile &`]] + [[`int(foo::*)() &&`] [`int(foo::*)() const volatile &&`]] + [[`int(foo::*)() const`] [`int(foo::*)() const volatile`]] + [[`int(foo::*)() volatile`] [`int(foo::*)() const volatile`]] + [[`int(foo::*)() transaction_safe`] [`int(foo::*)() const volatile transaction_safe`]] + [[`int`] [(substitution failure)]] + [[`int (&)()`] [(substitution failure)]] + [[`int (*)()`] [(substitution failure)]] + [[`int foo::*`] [(substitution failure)]] + [[`int (foo::* const)()`] [(substitution failure)]] +] + +[heading Example Program] +[import ../example/add_member_cv.cpp] +[add_member_cv] +[endsect] +*/ +//] + #endif diff --git a/include/callable_traits/add_member_lvalue_reference.hpp b/include/callable_traits/add_member_lvalue_reference.hpp index a5cca91..26518af 100644 --- a/include/callable_traits/add_member_lvalue_reference.hpp +++ b/include/callable_traits/add_member_lvalue_reference.hpp @@ -1,5 +1,4 @@ -/*! -@file +/* @copyright Barrett Adair 2015 Distributed under the Boost Software License, Version 1.0. @@ -12,14 +11,20 @@ Distributed under the Boost Software License, Version 1.0. #include +//[add_member_lvalue_reference_hpp +//`[section:ref_add_member_lvalue_reference add_member_lvalue_reference] + namespace callable_traits { template struct add_member_lvalue_reference { - using type = detail::fail_if_invalid< - typename detail::traits::add_member_lvalue_reference, - member_qualifiers_are_illegal_for_this_type>; + using type = //implementation-defined + //<- + detail::fail_if_invalid< + typename detail::traits::add_member_lvalue_reference, + member_qualifiers_are_illegal_for_this_type>; + //-> }; template @@ -27,4 +32,36 @@ namespace callable_traits { typename add_member_lvalue_reference::type; } +/*` +[heading Constraints] +* `T` must be a function type or a member function pointer + +[heading Behavior] +* Adds a member lvalue reference qualifier (`&`) to `T`, if not already present +* If an rvalue reference qualifier is present, the lvalue reference qualifier replaces it (in accordance with reference collapsing rules) + +[heading Input/Output Examples] +[table + [[`T`] [`add_member_lvalue_reference_t`]] + [[`int()`] [`int() &`]] + [[`int(foo::*)()`] [`int(foo::*)() &`]] + [[`int(foo::*)() &`] [`int(foo::*)() &`]] + [[`int(foo::*)() &&`] [`int(foo::*)() &`]] + [[`int(foo::*)() const`] [`int(foo::*)() const &`]] + [[`int(foo::*)() transaction_safe`] [`int(foo::*)() & transaction_safe`]] + [[`int`] [(substitution failure)]] + [[`int (&)()`] [(substitution failure)]] + [[`int (*)()`] [(substitution failure)]] + [[`int foo::*`] [(substitution failure)]] + [[`int (foo::* const)()`] [(substitution failure)]] +] + +[heading Example Program] +[import ../example/add_member_lvalue_reference.cpp] +[add_member_lvalue_reference] +[endsect] +*/ +//] + #endif + diff --git a/include/callable_traits/add_member_rvalue_reference.hpp b/include/callable_traits/add_member_rvalue_reference.hpp index 53741a5..e4be926 100644 --- a/include/callable_traits/add_member_rvalue_reference.hpp +++ b/include/callable_traits/add_member_rvalue_reference.hpp @@ -1,5 +1,4 @@ -/*! -@file +/* @copyright Barrett Adair 2015 Distributed under the Boost Software License, Version 1.0. @@ -12,14 +11,20 @@ Distributed under the Boost Software License, Version 1.0. #include +//[add_member_rvalue_reference_hpp +//`[section:ref_add_member_rvalue_reference add_member_rvalue_reference] + namespace callable_traits { template struct add_member_rvalue_reference { - using type = detail::fail_if_invalid< - typename detail::traits::add_member_rvalue_reference, - member_qualifiers_are_illegal_for_this_type>; + using type = //implementation-defined + //<- + detail::fail_if_invalid< + typename detail::traits::add_member_rvalue_reference, + member_qualifiers_are_illegal_for_this_type>; + //-> }; template @@ -27,4 +32,35 @@ namespace callable_traits { typename add_member_rvalue_reference::type; } +/*` +[heading Constraints] +* `T` must be a function type or a member function pointer + +[heading Behavior] +* Adds a member rvalue reference qualifier (`&&`) to `T`, if not already present +* If an lvalue reference qualifier is present, the lvalue reference qualifier remains (in accordance with reference collapsing rules) + +[heading Input/Output Examples] +[table + [[`T`] [`add_member_rvalue_reference_t`]] + [[`int()`] [`int() &&`]] + [[`int(foo::*)()`] [`int(foo::*)() &&`]] + [[`int(foo::*)() &`] [`int(foo::*)() &`]] + [[`int(foo::*)() &&`] [`int(foo::*)() &&`]] + [[`int(foo::*)() const`] [`int(foo::*)() const &&`]] + [[`int(foo::*)() transaction_safe`] [`int(foo::*)() && transaction_safe`]] + [[`int`] [(substitution failure)]] + [[`int (&)()`] [(substitution failure)]] + [[`int (*)()`] [(substitution failure)]] + [[`int foo::*`] [(substitution failure)]] + [[`int (foo::* const)()`] [(substitution failure)]] +] + +[heading Example Program] +[import ../example/add_member_rvalue_reference.cpp] +[add_member_rvalue_reference] +[endsect][/section:ref_add_member_rvalue_reference] +*/ +//] + #endif diff --git a/include/callable_traits/add_member_volatile.hpp b/include/callable_traits/add_member_volatile.hpp index d372e07..b9f1262 100644 --- a/include/callable_traits/add_member_volatile.hpp +++ b/include/callable_traits/add_member_volatile.hpp @@ -1,5 +1,4 @@ -/*! -@file +/* @copyright Barrett Adair 2015 Distributed under the Boost Software License, Version 1.0. @@ -12,19 +11,54 @@ Distributed under the Boost Software License, Version 1.0. #include +//[add_member_volatile_hpp +//`[section:ref_add_member_volatile add_member_volatile] namespace callable_traits { template struct add_member_volatile { - using type = detail::fail_if_invalid< - typename detail::traits::add_member_volatile, - member_qualifiers_are_illegal_for_this_type>; + using type = //implementation-defined + //<- + detail::fail_if_invalid< + typename detail::traits::add_member_volatile, + member_qualifiers_are_illegal_for_this_type>; + //-> }; template using add_member_volatile_t = typename add_member_volatile::type; } +/*` +[heading Constraints] +* `T` must be a function type or a member function pointer + +[heading Behavior] +* Adds a member volatile qualifier to `T` (if not already present) + +[heading Input/Output Examples] +[table + [[`T`] [`add_member_volatile_t`]] + [[`int()`] [`int() volatile`]] + [[`int(foo::*)()`] [`int(foo::*)() volatile`]] + [[`int(foo::*)() &`] [`int(foo::*)() volatile &`]] + [[`int(foo::*)() &&`] [`int(foo::*)() volatile &&`]] + [[`int(foo::*)() const`] [`int(foo::*)() const volatile`]] + [[`int(foo::*)() transaction_safe`] [`int(foo::*)() volatile transaction_safe`]] + [[`int`] [(substitution failure)]] + [[`int (&)()`] [(substitution failure)]] + [[`int (*)()`] [(substitution failure)]] + [[`int foo::*`] [(substitution failure)]] + [[`int (foo::* const)()`] [(substitution failure)]] +] + +[heading Example Program] +[import ../example/add_member_volatile.cpp] +[add_member_volatile] +[endsect][/section:ref_add_member_volatile] +*/ +//] + #endif diff --git a/include/callable_traits/add_transaction_safe.hpp b/include/callable_traits/add_transaction_safe.hpp index 63aed82..b486264 100644 --- a/include/callable_traits/add_transaction_safe.hpp +++ b/include/callable_traits/add_transaction_safe.hpp @@ -12,18 +12,22 @@ Distributed under the Boost Software License, Version 1.0. #include +//[add_transaction_safe_hpp +//`[section:ref_add_transaction_safe add_transaction_safe] + namespace callable_traits { + //<- CALLABLE_TRAITS_DEFINE_SFINAE_ERROR_ORIGIN(add_transaction_safe) CALLABLE_TRAITS_DEFINE_SFINAE_ERROR_FOR(add_transaction_safe, cannot_add_transaction_safe_to_this_type) - + //-> template struct add_transaction_safe { - using type = - + using type = //implementation-defined +//<- #ifdef CALLABLE_TRAITS_ENABLE_TRANSACTION_SAFE detail::fail_if_invalid< @@ -35,13 +39,46 @@ namespace callable_traits { detail::fail_if>; #endif - +//-> }; - template using add_transaction_safe_t = typename add_transaction_safe::type; } +/*` +[heading Constraints] +* `T` must be one of the following: + * function type + * function pointer + * function reference + * member function pointer + +[heading Behavior] +* Adds a `transaction_safe` specifier to `T` (if not already present) + +[heading Input/Output Examples] +[table + [[`T`] [`add_transaction_safe_t`]] + [[`int()`] [`int() transaction_safe`]] + [[`int (&)()`] [`int(&)() transaction_safe`]] + [[`int (*)()`] [`int(*)() transaction_safe`]] + [[`int(foo::*)()`] [`int(foo::*)() transaction_safe`]] + [[`int(foo::*)() &`] [`int(foo::*)() & transaction_safe`]] + [[`int(foo::*)() &&`] [`int(foo::*)() && transaction_safe`]] + [[`int(foo::*)() const`] [`int(foo::*)() const transaction_safe`]] + [[`int(foo::*)() transaction_safe`] [`int(foo::*)() transaction_safe`]] + [[`int`] [(substitution failure)]] + [[`int foo::*`] [(substitution failure)]] + [[`int (*&)()`] [(substitution failure)]] +] + +[heading Example Program] +[import ../example/add_transaction_safe.cpp] +[add_transaction_safe] +[endsect] +*/ +//] + #endif //#ifndef CALLABLE_TRAITS_ADD_TRANSACTION_SAFE_HPP diff --git a/include/callable_traits/callable_traits.hpp b/include/callable_traits/callable_traits.hpp index d2592cd..3ba54db 100644 --- a/include/callable_traits/callable_traits.hpp +++ b/include/callable_traits/callable_traits.hpp @@ -41,10 +41,10 @@ Distributed under the Boost Software License, Version 1.0. #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include diff --git a/include/callable_traits/pop_back.hpp b/include/callable_traits/pop_back_args.hpp similarity index 86% rename from include/callable_traits/pop_back.hpp rename to include/callable_traits/pop_back_args.hpp index c3b860f..aa2d36c 100644 --- a/include/callable_traits/pop_back.hpp +++ b/include/callable_traits/pop_back_args.hpp @@ -15,7 +15,7 @@ Distributed under the Boost Software License, Version 1.0. namespace callable_traits { template - struct args_pop_back { + struct pop_back_args { using type = detail::fail_if_invalid< typename detail::traits::template pop_back, @@ -23,8 +23,8 @@ namespace callable_traits { }; template - using args_pop_back_t = - typename args_pop_back::type; + using pop_back_args_t = + typename pop_back_args::type; } #endif //CALLABLE_TRAITS_POP_BACK_HPP diff --git a/include/callable_traits/pop_front.hpp b/include/callable_traits/pop_front_args.hpp similarity index 85% rename from include/callable_traits/pop_front.hpp rename to include/callable_traits/pop_front_args.hpp index a37ac78..ab32037 100644 --- a/include/callable_traits/pop_front.hpp +++ b/include/callable_traits/pop_front_args.hpp @@ -15,7 +15,7 @@ Distributed under the Boost Software License, Version 1.0. namespace callable_traits { template - struct args_pop_front { + struct pop_front_args { using type = detail::fail_if_invalid< typename detail::traits::template pop_front, @@ -24,8 +24,8 @@ namespace callable_traits { template - using args_pop_front_t = - typename args_pop_front::type; + using pop_front_args_t = + typename pop_front_args::type; } diff --git a/include/callable_traits/push_back.hpp b/include/callable_traits/push_back_args.hpp similarity index 85% rename from include/callable_traits/push_back.hpp rename to include/callable_traits/push_back_args.hpp index c410b73..f8deeff 100644 --- a/include/callable_traits/push_back.hpp +++ b/include/callable_traits/push_back_args.hpp @@ -15,7 +15,7 @@ Distributed under the Boost Software License, Version 1.0. namespace callable_traits { template - struct args_push_back { + struct push_back_args { using type = detail::fail_if_invalid< typename detail::traits::template push_back, @@ -23,8 +23,8 @@ namespace callable_traits { }; template - using args_push_back_t = - typename args_push_back::type; + using push_back_args_t = + typename push_back_args::type; } #endif //CALLABLE_TRAITS_PUSH_BACK_HPP diff --git a/include/callable_traits/push_front.hpp b/include/callable_traits/push_front_args.hpp similarity index 84% rename from include/callable_traits/push_front.hpp rename to include/callable_traits/push_front_args.hpp index 19f7941..ac2edd0 100644 --- a/include/callable_traits/push_front.hpp +++ b/include/callable_traits/push_front_args.hpp @@ -17,7 +17,7 @@ namespace callable_traits { namespace detail { template - struct args_push_front_error : sfinae_error { + struct push_front_args_error : sfinae_error { static_assert(Sfinae, "callable_traits::push_front is " @@ -26,7 +26,7 @@ namespace callable_traits { } template - struct args_push_front { + struct push_front_args { using type = detail::fail_if_invalid< typename detail::traits::template push_front, @@ -34,8 +34,8 @@ namespace callable_traits { }; template - using args_push_front_t = - typename args_push_front::type; + using push_front_args_t = + typename push_front_args::type; } #endif //CALLABLE_TRAITS_PUSH_FRONT_HPP diff --git a/test/pop_back_function.cpp b/test/pop_back_args_function.cpp similarity index 84% rename from test/pop_back_function.cpp rename to test/pop_back_args_function.cpp index fdebc7e..1c4142a 100644 --- a/test/pop_back_function.cpp +++ b/test/pop_back_args_function.cpp @@ -18,28 +18,28 @@ using sig = int(Ts...); int main() { { using f = sig, N<1>, N<2>, N<3>, N<4>>; - using test = ct::args_pop_back_t; + using test = ct::pop_back_args_t; using expect = sig, N<1>, N<2>>; CT_ASSERT(std::is_same::value); } { using f = sig, N<1>, N<2>, N<3>, N<4>>; - using test = ct::args_pop_back_t; + using test = ct::pop_back_args_t; using expect = sig<>; CT_ASSERT(std::is_same::value); } { using f = sig, N<1>, N<2>, N<3>, N<4>>; - using test = ct::args_pop_back_t; + using test = ct::pop_back_args_t; using expect = sig, N<1>, N<2>, N<3>, N<4>>; CT_ASSERT(std::is_same::value); } { using f = sig, N<1>, N<2>, N<3>, N<4>>; - using test = ct::args_pop_back_t; + using test = ct::pop_back_args_t; using expect = sig, N<1>, N<2>, N<3>>; CT_ASSERT(std::is_same::value); } diff --git a/test/pop_back_function_ptr.cpp b/test/pop_back_args_function_ptr.cpp similarity index 84% rename from test/pop_back_function_ptr.cpp rename to test/pop_back_args_function_ptr.cpp index 88d6576..1260697 100644 --- a/test/pop_back_function_ptr.cpp +++ b/test/pop_back_args_function_ptr.cpp @@ -18,28 +18,28 @@ using sig = void(*)(Ts...); int main() { { using f = sig, N<1>, N<2>, N<3>, N<4>>; - using test = ct::args_pop_back_t; + using test = ct::pop_back_args_t; using expect = sig, N<1>, N<2>>; CT_ASSERT(std::is_same::value); } { using f = sig, N<1>, N<2>, N<3>, N<4>>; - using test = ct::args_pop_back_t; + using test = ct::pop_back_args_t; using expect = sig<>; CT_ASSERT(std::is_same::value); } { using f = sig, N<1>, N<2>, N<3>, N<4>>; - using test = ct::args_pop_back_t; + using test = ct::pop_back_args_t; using expect = sig, N<1>, N<2>, N<3>, N<4>>; CT_ASSERT(std::is_same::value); } { using f = sig, N<1>, N<2>, N<3>, N<4>>; - using test = ct::args_pop_back_t; + using test = ct::pop_back_args_t; using expect = sig, N<1>, N<2>, N<3>>; CT_ASSERT(std::is_same::value); } diff --git a/test/pop_back_function_reference.cpp b/test/pop_back_args_function_reference.cpp similarity index 84% rename from test/pop_back_function_reference.cpp rename to test/pop_back_args_function_reference.cpp index 66b2ad6..92156e4 100644 --- a/test/pop_back_function_reference.cpp +++ b/test/pop_back_args_function_reference.cpp @@ -18,28 +18,28 @@ using sig = const char*(&)(Ts...); int main() { { using f = sig, N<1>, N<2>, N<3>, N<4>>; - using test = ct::args_pop_back_t; + using test = ct::pop_back_args_t; using expect = sig, N<1>, N<2>>; CT_ASSERT(std::is_same::value); } { using f = sig, N<1>, N<2>, N<3>, N<4>>; - using test = ct::args_pop_back_t; + using test = ct::pop_back_args_t; using expect = sig<>; CT_ASSERT(std::is_same::value); } { using f = sig, N<1>, N<2>, N<3>, N<4>>; - using test = ct::args_pop_back_t; + using test = ct::pop_back_args_t; using expect = sig, N<1>, N<2>, N<3>, N<4>>; CT_ASSERT(std::is_same::value); } { using f = sig, N<1>, N<2>, N<3>, N<4>>; - using test = ct::args_pop_back_t; + using test = ct::pop_back_args_t; using expect = sig, N<1>, N<2>, N<3>>; CT_ASSERT(std::is_same::value); } diff --git a/test/pop_back_pmf.cpp b/test/pop_back_args_pmf.cpp similarity index 84% rename from test/pop_back_pmf.cpp rename to test/pop_back_args_pmf.cpp index 2e0ed07..8947bff 100644 --- a/test/pop_back_pmf.cpp +++ b/test/pop_back_args_pmf.cpp @@ -20,28 +20,28 @@ using sig = void(foo::*)(Ts...); int main() { { using f = sig, N<1>, N<2>, N<3>, N<4>>; - using test = ct::args_pop_back_t; + using test = ct::pop_back_args_t; using expect = sig, N<1>, N<2>>; CT_ASSERT(std::is_same::value); } { using f = sig, N<1>, N<2>, N<3>, N<4>>; - using test = ct::args_pop_back_t; + using test = ct::pop_back_args_t; using expect = sig<>; CT_ASSERT(std::is_same::value); } { using f = sig, N<1>, N<2>, N<3>, N<4>>; - using test = ct::args_pop_back_t; + using test = ct::pop_back_args_t; using expect = sig, N<1>, N<2>, N<3>, N<4>>; CT_ASSERT(std::is_same::value); } { using f = sig, N<1>, N<2>, N<3>, N<4>>; - using test = ct::args_pop_back_t; + using test = ct::pop_back_args_t; using expect = sig, N<1>, N<2>, N<3>>; CT_ASSERT(std::is_same::value); } diff --git a/test/pop_front_function.cpp b/test/pop_front_args_function.cpp similarity index 85% rename from test/pop_front_function.cpp rename to test/pop_front_args_function.cpp index 79dfdda..e5c5893 100644 --- a/test/pop_front_function.cpp +++ b/test/pop_front_args_function.cpp @@ -19,21 +19,21 @@ int main() { { using f = sig, N<1>, N<2>, N<3>, N<4>>; - using test = ct::args_pop_front_t; + using test = ct::pop_front_args_t; using expect = sig, N<2>, N<3>, N<4>>; CT_ASSERT(std::is_same::value); } { using f = sig, N<1>, N<2>, N<3>, N<4>>; - using test = ct::args_pop_front_t; + using test = ct::pop_front_args_t; using expect = sig, N<3>, N<4>>; CT_ASSERT(std::is_same::value); } { using f = sig, N<1>, N<2>, N<3>, N<4>>; - using test = ct::args_pop_front_t; + using test = ct::pop_front_args_t; using expect = sig<>; CT_ASSERT(std::is_same::value); } diff --git a/test/push_back_function.cpp b/test/push_back_args_function.cpp similarity index 90% rename from test/push_back_function.cpp rename to test/push_back_args_function.cpp index 0bec016..f8dbd4d 100644 --- a/test/push_back_function.cpp +++ b/test/push_back_args_function.cpp @@ -21,7 +21,7 @@ int main() { { using f = sig, N<1>, N<2>, N<3>, N<4>>; - using test = ct::args_push_back_t; + using test = ct::push_back_args_t; using expect = sig, N<1>, N<2>, N<3>, N<4>, int&, char*>; CT_ASSERT(std::is_same::value); } diff --git a/test/push_back_function_ptr.cpp b/test/push_back_args_function_ptr.cpp similarity index 90% rename from test/push_back_function_ptr.cpp rename to test/push_back_args_function_ptr.cpp index 155938a..fc86012 100644 --- a/test/push_back_function_ptr.cpp +++ b/test/push_back_args_function_ptr.cpp @@ -21,7 +21,7 @@ int main() { { using f = sig, N<1>, N<2>, N<3>, N<4>>; - using test = ct::args_push_back_t; + using test = ct::push_back_args_t; using expect = sig, N<1>, N<2>, N<3>, N<4>, int&, char*>; CT_ASSERT(std::is_same::value); } diff --git a/test/push_back_pmf.cpp b/test/push_back_args_pmf.cpp similarity index 90% rename from test/push_back_pmf.cpp rename to test/push_back_args_pmf.cpp index 88ea7ec..ff7d52b 100644 --- a/test/push_back_pmf.cpp +++ b/test/push_back_args_pmf.cpp @@ -21,7 +21,7 @@ int main() { { using f = sig, N<1>, N<2>, N<3>, N<4>>; - using test = ct::args_push_back_t; + using test = ct::push_back_args_t; using expect = sig, N<1>, N<2>, N<3>, N<4>, int&, char*>; CT_ASSERT(std::is_same::value); } diff --git a/test/push_back_pmf_varargs.cpp b/test/push_back_args_pmf_varargs.cpp similarity index 90% rename from test/push_back_pmf_varargs.cpp rename to test/push_back_args_pmf_varargs.cpp index 82ffcb8..9db4ed8 100644 --- a/test/push_back_pmf_varargs.cpp +++ b/test/push_back_args_pmf_varargs.cpp @@ -21,7 +21,7 @@ int main() { { using f = sig, N<1>, N<2>, N<3>, N<4>>; - using test = ct::args_push_back_t; + using test = ct::push_back_args_t; using expect = sig, N<1>, N<2>, N<3>, N<4>, int&, char*>; CT_ASSERT(std::is_same::value); } diff --git a/test/push_front_function.cpp b/test/push_front_args_function.cpp similarity index 91% rename from test/push_front_function.cpp rename to test/push_front_args_function.cpp index cb6c1f8..f3bf945 100644 --- a/test/push_front_function.cpp +++ b/test/push_front_args_function.cpp @@ -27,7 +27,7 @@ int main() { { using f = sig, N<1>, N<2>, N<3>, N<4>>; - using test = ct::args_push_front_t; + using test = ct::push_front_args_t; using expect = sig, N<1>, N<2>, N<3>, N<4>>; CT_ASSERT(std::is_same::value); } diff --git a/test/push_front_function_ptr.cpp b/test/push_front_args_function_ptr.cpp similarity index 90% rename from test/push_front_function_ptr.cpp rename to test/push_front_args_function_ptr.cpp index 6556b6f..08d6dc7 100644 --- a/test/push_front_function_ptr.cpp +++ b/test/push_front_args_function_ptr.cpp @@ -21,7 +21,7 @@ int main() { { using f = sig, N<1>, N<2>, N<3>, N<4>>; - using test = ct::args_push_front_t; + using test = ct::push_front_args_t; using expect = sig, N<1>, N<2>, N<3>, N<4>>; CT_ASSERT(std::is_same::value); } diff --git a/test/push_front_function_reference.cpp b/test/push_front_args_function_reference.cpp similarity index 90% rename from test/push_front_function_reference.cpp rename to test/push_front_args_function_reference.cpp index 54090ea..f82e301 100644 --- a/test/push_front_function_reference.cpp +++ b/test/push_front_args_function_reference.cpp @@ -21,7 +21,7 @@ int main() { { using f = sig, N<1>, N<2>, N<3>, N<4>>; - using test = ct::args_push_front_t; + using test = ct::push_front_args_t; using expect = sig, N<1>, N<2>, N<3>, N<4>>; CT_ASSERT(std::is_same::value); } diff --git a/test/push_front_pmf.cpp b/test/push_front_args_pmf.cpp similarity index 91% rename from test/push_front_pmf.cpp rename to test/push_front_args_pmf.cpp index 445d963..8c4193a 100644 --- a/test/push_front_pmf.cpp +++ b/test/push_front_args_pmf.cpp @@ -27,7 +27,7 @@ int main() { { using f = sig, N<1>, N<2>, N<3>, N<4>>; - using test = ct::args_push_front_t; + using test = ct::push_front_args_t; using expect = sig, N<1>, N<2>, N<3>, N<4>>; CT_ASSERT(std::is_same::value); } diff --git a/test/push_front_pmf_varargs.cpp b/test/push_front_args_pmf_varargs.cpp similarity index 92% rename from test/push_front_pmf_varargs.cpp rename to test/push_front_args_pmf_varargs.cpp index da0a3d8..fdceaa0 100644 --- a/test/push_front_pmf_varargs.cpp +++ b/test/push_front_args_pmf_varargs.cpp @@ -27,7 +27,7 @@ int main() { { using f = sig, N<1>, N<2>, N<3>, N<4>>; - using test = ct::args_push_front_t; + using test = ct::push_front_args_t; using expect = sig, N<1>, N<2>, N<3>, N<4>>; CT_ASSERT(std::is_same::value); }