/any_function

any_function is a functional counterpart to std::any

Primary LanguageC++The UnlicenseUnlicense

any_function.h

Release is 0.8 License is Unlicense

Platform Build Status
Visual Studio 2013 AppVeyor: Build status
GCC 4.9 Travis CI: Build status

any_function.h is a single header public domain utility library for C++11.

It is intended to serve as a functional counterpart to the std::any, by providing a single, concrete class any_function which can receive almost any callable object, from function pointers to lambdas to instantiations of std::function.

This library is still under development and its API and implementation details are subject to change.

TODO

  • Retain reference/const/volatile qualification in parameter and return type metadata
  • L-value reference parameters (should work, but needs testing)
  • R-value reference parameters
  • L-value reference return types
  • R-value reference return types
  • Const/volatile qualified parameters
  • Const/volatile qualified return type
  • Mutable lambdas / stateful function objects