Stan Math Library  2.10.0
reverse mode automatic differentiation
is_constant.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_META_IS_CONSTANT_HPP
2 #define STAN_MATH_PRIM_SCAL_META_IS_CONSTANT_HPP
3 
4 #include <boost/type_traits/is_convertible.hpp>
5 
6 namespace stan {
7 
21  template <typename T>
22  struct is_constant {
27  enum { value = boost::is_convertible<T, double>::value };
28  };
29 
30 }
31 #endif
32 
Metaprogramming struct to detect whether a given type is constant in the mathematical sense (not the ...
Definition: is_constant.hpp:22

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