![]() |
Stan Math Library
2.11.0
reverse mode automatic differentiation
|
Metaprogramming struct to detect whether a given type is constant in the mathematical sense (not the C++ const sense).
More...
#include <is_constant.hpp>
Public Types | |
| enum | { value = boost::is_convertible<T, double>::value } |
A boolean constant with equal to true if the type parameter T is a mathematical constant. More... | |
Metaprogramming struct to detect whether a given type is constant in the mathematical sense (not the C++ const sense).
If the parameter type is constant, value will be equal to true.
The baseline implementation in this abstract base class is to classify a type T as constant if it can be converted (i.e., assigned) to a double. This baseline should be overridden for any type that should be treated as a variable.
| T | Type being tested. |
Definition at line 22 of file is_constant.hpp.
| anonymous enum |
A boolean constant with equal to true if the type parameter T is a mathematical constant.
| Enumerator | |
|---|---|
| value | |
Definition at line 27 of file is_constant.hpp.