|  | WPILibC++ 2025.3.2
    | 
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/PointerIntPair.h"#include "wpi/PointerUnion.h"#include "wpi/STLForwardCompat.h"#include "wpi/Compiler.h"#include "wpi/MemAlloc.h"#include "wpi/type_traits.h"#include <cstring>#include <memory>#include <type_traits>Go to the source code of this file.
| Namespaces | |
| namespace | wpi | 
| Foonathan namespace. | |
| namespace | wpi::detail | 
| These are wrappers over isa* function that allow them to be used in generic algorithms such as wpi:all_of,wpi::none_of, etc. | |
| Typedefs | |
| template<typename T > | |
| using | wpi::detail::EnableIfTrivial | 
| template<typename CallableT , typename ThisT > | |
| using | wpi::detail::EnableUnlessSameType | 
| template<typename CallableT , typename Ret , typename... Params> | |
| using | wpi::detail::EnableIfCallable | 
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:
function that provides ref-qualified support, which doesn't work with std::function.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.