Automatic Differentiation
 
Loading...
Searching...
No Matches
is_vector_like.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_PRIM_META_IS_VECTOR_LIKE_HPP
2#define STAN_MATH_PRIM_META_IS_VECTOR_LIKE_HPP
3
9
10#include <type_traits>
11
12namespace stan {
13
14namespace internal {
18template <typename T>
19using operator_bracket_t = decltype(std::declval<T>()[int{}]);
20} // namespace internal
21
34template <typename T>
36 : bool_constant<is_detected<T, internal::operator_bracket_t>::value> {};
37
45template <typename T>
47
50template <typename T>
53
56template <typename... Types>
59
62template <typename... Types>
65
68template <typename... Types>
71
75template <typename... Types>
90template <template <class...> class TypeCheck, class... Check>
93 TypeCheck, Check...>>;
96} // namespace stan
97#endif
typename value_type< T >::type value_type_t
Helper function for accessing underlying type.
require_any_t< is_vector_like< std::decay_t< Types > >... > require_any_vector_like_t
Require any of the types satisfy is_vector_like.
require_t< is_vector_like< std::decay_t< T > > > require_vector_like_t
Require type satisfies is_vector_like.
require_t< container_type_check_base< is_vector_like, value_type_t, TypeCheck, Check... > > require_vector_like_vt
Require type satisfies is_vector_like.
require_any_not_t< is_vector_like< std::decay_t< Types > >... > require_any_not_vector_like_t
Require at least one of the types do not satisfy is_vector_like.
require_all_t< is_vector_like< std::decay_t< Types > >... > require_all_vector_like_t
Require all of the types satisfy is_vector_like.
require_all_not_t< is_vector_like< std::decay_t< Types > >... > require_all_not_vector_like_t
Require none of the types satisfy is_vector_like.
require_not_t< is_vector_like< std::decay_t< T > > > require_not_vector_like_t
Require type does not satisfy is_vector_like.
decltype(std::declval< T >()[int{}]) operator_bracket_t
Used to detect if object has operator[](int) defined.
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 ...
Template metaprogram indicates whether a type is vector_like.