| Stan Math Library 2.11.0 reverse mode automatic differentiation

- Main Page
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Types | List of all members
stan::is_constant< T > Struct Template Reference

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...

## Detailed Description

### template<typename T>
struct stan::is_constant< T >

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.

Template Parameters

  T | Type being tested.

Definition at line 22 of file is_constant.hpp.

## Member Enumeration Documentation

template<typename T >

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.

The documentation for this struct was generated from the following file:

- stan/math/prim/scal/meta/is_constant.hpp

[ Stan Home Page ] © 2011–2016, Stan Development Team.