A type for use with the VariableUser system to represent a compile time constant. More...
#include <Var.hpp>
Public Types | |
using | ValueType = T |
using | Vars = VariableNames<> |
template<typename... > | |
using | ReplaceChildren = Constant< Value, T > |
Public Types inherited from sp::VariableUser< Constant< Value, decltype(Value) > > | |
using | Substitute = std::conditional_t< std::is_same_v< Constant< Value, decltype(Value) >, Old >, New, typename DeferSubclass< Old >::template ReplaceChildren< typename Children::template Substitute< Old, New >... > > |
Recursively substitute the given old user with the given new user. More... | |
using | Vars = typename sp::cat_integer_sequences< typename Children::Vars... >::template sort<>::template unique<> |
The set of unbound variable names. More... | |
using | VarType = typename VarTypeHelper< typename Children::template VarType< Name >... >::type |
The type of a named variable. More... | |
using | ChildType = typename sp::TypeList< Children... >::template get< I > |
The type of the Ith child. More... | |
Public Member Functions | |
constexpr decltype(Value) | operator() () const |
constexpr T | operator() () const |
constexpr T | operator() () const |
Public Member Functions inherited from sp::VariableUser< Constant< Value, decltype(Value) > > | |
constexpr decltype(auto) | operator() (Ts &&... values) const |
Calls operator() on the result of binding this object to a set of variables. More... | |
constexpr auto & | get () |
Get the Ith child. More... | |
constexpr const auto & | get () const |
Get the Ith child. More... | |
constexpr auto | bind (Ts &&... values) const |
Bind a specified set of values to the corresponding variables in this expression. More... | |
constexpr auto | bind (Ts &&... values) const |
Bind a set of values to the expression's variables. More... | |
constexpr auto | substitute (const New &newValue) const |
Substitute all instances of the given type with the the given new value. More... | |
constexpr auto | replaceChildren (NewChildren &&... newChildren) const |
Replace the children of this variable user with the given new children. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from sp::VariableUser< Constant< Value, decltype(Value) > > | |
static constexpr VariableName | getUnusedVariableName (int i=0) |
Get an unused variable name. More... | |
Static Public Attributes inherited from sp::VariableUser< Constant< Value, decltype(Value) > > | |
static constexpr bool | IsFullyBound |
True if there are no unbound variables, and false if there are. More... | |
static constexpr bool | IsFullyUnbound |
False if there are any bound variables, and true if there aren't. More... | |
static constexpr int | ChildCount |
The number of children. More... | |
Protected Member Functions inherited from sp::VariableUser< Constant< Value, decltype(Value) > > | |
constexpr | VariableUser (Ts &&... children) |
Copy the arguments into the children tuple. More... | |
A type for use with the VariableUser system to represent a compile time constant.
Value | the value to given when operator() is called. |
T | The type of value to represent. |