#include <type_traits>
#include "../config.hpp"
Go to the source code of this file.
◆ WPI_AUTO_RETURN
#define WPI_AUTO_RETURN |
( |
| Expr | ) |
|
Value: decltype(Expr) \
{ \
return Expr; \
}
◆ WPI_AUTO_RETURN_TYPE
#define WPI_AUTO_RETURN_TYPE |
( |
| Expr, |
|
|
| T ) |
Value: decltype(Expr) \
{ \
static_assert(std::is_same<decltype(Expr), T>::value, \
#Expr " does not have the return type " #T); \
return Expr; \
}
◆ WPI_ENABLE_IF
#define WPI_ENABLE_IF |
( |
| Expr | ) |
|
Value: template <typename Dummy = std::true_type, WPI_REQUIRES(Dummy::value && (Expr))>
◆ WPI_REQUIRES
#define WPI_REQUIRES |
( |
| Expr | ) |
|
Value:typename std::enable_if<(Expr), int>::type = 0
◆ WPI_REQUIRES_RET
#define WPI_REQUIRES_RET |
( |
| Expr, |
|
|
| ... ) |
Value:typename std::enable_if<(Expr), __VA_ARGS__>::type
◆ WPI_SFINAE
#define WPI_SFINAE |
( |
| Expr | ) |
|
Value:decltype((Expr), int()) = 0