[RFC] CallableTraits: 47 traits and metafunctions for "callable" types
Hello all, I'm working on a project called CallableTraits [1]. Is there any interest in adding this to Boost? I think it would work well as an extension to Boost.TypeTraits.
From the introduction section:
CallableTraits 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, CallableTraits provides all the tools you need to completely rid your codebase of function type specializations. This project aims to be the "complete type manipulation facility for function types" mentioned in the last section of C++17 proposal p0172 [2]. CallableTraits currently supports GCC 4.8 and later, Clang 3.5 and later, AppleClang from XCode 6.3 and later, and MSVC 19. Much of the remaining documentation work lies in the reference sections. Many examples are provided, but many more are planned. Test coverage is good, but insufficient. Daily improvements are being made to address these issues. The headers amount to approximately 4200 lines of code, while the tests and examples tally around 6000 lines (excluding comments and blank lines). An "issues" list is maintained on GitHub [3]. Barrett [1]: http://badair.github.io/callable_traits/doc/html/index.html [2]: http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2015/p0172r0.html [3]: https://github.com/badair/callable_traits/issues
On 4/18/2016 7:12 PM, Barrett Adair wrote:
Hello all,
I'm working on a project called CallableTraits [1]. Is there any interest in adding this to Boost? I think it would work well as an extension to Boost.TypeTraits.
From the introduction section:
CallableTraits 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, CallableTraits provides all the tools you need to completely rid your codebase of function type specializations. This project aims to be the "complete type manipulation facility for function types" mentioned in the last section of C++17 proposal p0172 [2]. CallableTraits currently supports GCC 4.8 and later, Clang 3.5 and later, AppleClang from XCode 6.3 and later, and MSVC 19.
Much of the remaining documentation work lies in the reference sections. Many examples are provided, but many more are planned. Test coverage is good, but insufficient. Daily improvements are being made to address these issues.
The headers amount to approximately 4200 lines of code, while the tests and examples tally around 6000 lines (excluding comments and blank lines). An "issues" list is maintained on GitHub [3].
Barrett
[1]: http://badair.github.io/callable_traits/doc/html/index.html [2]: http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2015/p0172r0.html [3]: https://github.com/badair/callable_traits/issues
It sounds exciting ! Please take a look at the current Boost function_types library, which works with a number of callable types. You may want to distinguish your library from what function_types currently offers in your documentation.
On Tue, Apr 19, 2016 at 5:12 AM, Edward Diener
On 4/18/2016 7:12 PM, Barrett Adair wrote:
Hello all,
I'm working on a project called CallableTraits [1]. Is there any interest in adding this to Boost? I think it would work well as an extension to Boost.TypeTraits.
[snip]
Barrett
[1]: http://badair.github.io/callable_traits/doc/html/index.html
It sounds exciting ! Please take a look at the current Boost function_types library, which works with a number of callable types. You may want to distinguish your library from what function_types currently offers in your documentation.
I'll devote a section early in the documentation to make distinctions. In the meantime: There is certainly a lot of crossover. The main difference between CallableTraits is that FunctionTypes is tightly coupled to the MPL. CallableTraits approaches function type construction/decomposition as a much lower-level problem. Here [1] is my write-up and re-implementation of FunctionTypes' interface example. The new version allows for a more familiar and fluid syntax. The only known trade-off is that my version uses an implementation-defined reinterpret_cast (more discussion in the linked gist). Thanks, Barrett [1]: https://gist.github.com/badair/7dc7b438c0f1e314d7cd1d90e6f4a3ad
_______________________________________________ Unsubscribe & other changes:
participants (2)
-
Barrett Adair
-
Edward Diener