Automatic Differentiation
 
Loading...
Searching...
No Matches
require_helpers.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_PRIM_META_REQUIRE_HELPERS_HPP
2#define STAN_MATH_PRIM_META_REQUIRE_HELPERS_HPP
3
9
10#include <type_traits>
11
12namespace stan {
13
18template <class Check>
19using require_t = std::enable_if_t<Check::value>;
20
25template <typename Check>
26using require_not_t = std::enable_if_t<!Check::value>;
27
33template <class... Checks>
34using require_all_t = std::enable_if_t<math::conjunction<Checks...>::value>;
35
42template <class... Checks>
43using require_any_t = std::enable_if_t<math::disjunction<Checks...>::value>;
44
51template <class... Checks>
53 = std::enable_if_t<!math::disjunction<Checks...>::value>;
54
61template <class... Checks>
63 = std::enable_if_t<!math::conjunction<Checks...>::value>;
64
79template <template <class...> class ContainerCheck,
80 template <class...> class ValueCheck,
81 template <class...> class TypeCheck, class... Check>
84 TypeCheck<ValueCheck<Check>>...>::value>;
85
86} // namespace stan
87
88#endif
std::integral_constant< bool, B > bool_constant
Alias for structs used for wraps a static constant of bool.
std::enable_if_t<!Check::value > require_not_t
If condition is false, template is disabled.
std::enable_if_t< math::disjunction< Checks... >::value > require_any_t
If any condition is true, template is enabled.
std::enable_if_t<!math::disjunction< Checks... >::value > require_all_not_t
If all conditions are false, template is enabled.
bool_constant< math::conjunction< ContainerCheck< std::decay_t< Check > >..., TypeCheck< ValueCheck< Check > >... >::value > container_type_check_base
Used as the base for checking whether a type is a container with an underlying scalar type.
std::enable_if_t<!math::conjunction< Checks... >::value > require_any_not_t
If any condition is false, template is enabled.
std::enable_if_t< Check::value > require_t
If condition is true, template is enabled.
std::enable_if_t< math::conjunction< Checks... >::value > require_all_t
If all conditions are true, template is enabled Returns a type void if all conditions are true and ot...
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Extends std::true_type when instantiated with zero or more template parameters, all of which extend t...
Extends std::false_type when instantiated with zero or more template parameters, all of which extend ...