The result of binding a Variable to a specific value. More...
#include <Var.hpp>
Public Types | |
| using | ValueType = T |
| using | Vars = VariableNames<> |
| template<typename... > | |
| using | ReplaceChildren = BoundVariable< T > |
Public Types inherited from sp::VariableUser< BoundVariable< T > > | |
| using | Substitute = std::conditional_t< std::is_same_v< BoundVariable< T >, 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 | BoundVariable (const BoundVariable &other) |
| constexpr | BoundVariable (BoundVariable &&other) |
| constexpr BoundVariable & | operator= (const BoundVariable &other) |
| constexpr BoundVariable & | operator= (BoundVariable &&other) |
|
template<typename U > requires (!std::is_same_v<BoundVariable, std::remove_cvref_t<U>>) | |
| constexpr | BoundVariable (U &&value) |
| constexpr T | operator() () const |
| template<typename... > | |
| constexpr auto | replaceChildren () const |
Public Member Functions inherited from sp::VariableUser< BoundVariable< T > > | |
| 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... | |
Static Public Attributes | |
| static constexpr bool | IsFullyUnbound = false |
Static Public Attributes inherited from sp::VariableUser< BoundVariable< T > > | |
| 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... | |
Additional Inherited Members | |
Static Public Member Functions inherited from sp::VariableUser< BoundVariable< T > > | |
| static constexpr VariableName | getUnusedVariableName (int i=0) |
| Get an unused variable name. More... | |
Protected Member Functions inherited from sp::VariableUser< BoundVariable< T > > | |
| constexpr | VariableUser (Ts &&... children) |
| Copy the arguments into the children tuple. More... | |
The result of binding a Variable to a specific value.
Library users should not create objects of this type directly. Instead, they should be created using VariableUser::bind() or sp::bind().