AuROXTL/Include/auROXTL/auFunctional.hpp

29 lines
649 B
C++
Raw Normal View History

2022-04-01 04:06:53 +00:00
/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: auFunctional.hpp
Date: 2022-2-1
Author: Reece
***/
#pragma once
#if !defined(AURORA_RUNTIME_AU_FUNC)
#define AURORA_RUNTIME_AU_FUNC std::function
#endif
template <class T>
using AuFunction = AURORA_RUNTIME_AU_FUNC<T>;
template <class ...T>
using AuPredicate = AuFunction<bool(T...)>;
using AuVoidFunc = AuFunction<void(void)>;
template <class ...T>
using AuConsumer = AuFunction<void(T...)>;
template <class T>
using AuSupplier = AuFunction<T(void)>;
template <class T, typename ...Args>
using AuSupplierConsumer = AuFunction<T(Args...)>;