![]() |
WPILibC++ 2027.0.0-alpha-4
|
This file provides a collection of function (or more generally, callable) type erasure utilities supplementing those provided by the standard library in <function>. More...
#include "wpi/util/PointerIntPair.hpp"#include "wpi/util/PointerUnion.hpp"#include "wpi/util/STLForwardCompat.hpp"#include "wpi/util/Compiler.hpp"#include "wpi/util/MemAlloc.hpp"#include "wpi/util/type_traits.hpp"#include <cstring>#include <memory>#include <type_traits>Go to the source code of this file.
Namespaces | |
| namespace | wpi |
| namespace | wpi::util |
| namespace | wpi::util::detail |
| These are wrappers over isa* function that allow them to be used in generic algorithms such as wpi::util:all_of, wpi::util::none_of, etc. | |
Typedefs | |
| template<typename T> | |
| using | wpi::util::detail::EnableIfTrivial |
| template<typename CallableT, typename ThisT> | |
| using | wpi::util::detail::EnableUnlessSameType |
| template<typename CallableT, typename Ret, typename... Params> | |
| using | wpi::util::detail::EnableIfCallable |
Variables | |
| template<typename CallableT, typename CalledAsT, typename Enable> | |
| UniqueFunctionBase< R, P... >::NonTrivialCallbacks | wpi::util::detail::UniqueFunctionBase< R, P... >::CallbacksHolder< CallableT, CalledAsT, Enable >::Callbacks |
| template<typename CallableT, typename CalledAsT> | |
| UniqueFunctionBase< R, P... >::TrivialCallback | wpi::util::detail::UniqueFunctionBase< R, P... >::CallbacksHolder< CallableT, CalledAsT, EnableIfTrivial< CallableT > >::Callbacks |
This file provides a collection of function (or more generally, callable) type erasure utilities supplementing those provided by the standard library in <function>.
It provides unique_function, which works like std::function but supports move-only callable objects and const-qualification.
Future plans:
Note that LLVM's utilities are greatly simplified by not supporting allocators.
If the standard library ever begins to provide comparable facilities we can consider switching to those.