cMHN 1.1
C++ library for learning MHNs with pRC
Loading...
Searching...
No Matches
subscript.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-2-Clause
2
3#ifndef pRC_CORE_FUNCTORS_SUBSCRIPT_H
4#define pRC_CORE_FUNCTORS_SUBSCRIPT_H
5
7
8namespace pRC
9{
10 struct Subscript
11 {
12 template<class X,
14 constexpr decltype(auto) operator()(X &&a, Index const index) const
15 {
16 return forward<X>(a)[index];
17 }
18 };
19
20 template<class T>
22}
23#endif // pRC_CORE_FUNCTORS_SUBSCRIPT_H
Definition cholesky.hpp:18
static constexpr auto makeConstantSequence()
Definition sequence.hpp:402
Size Index
Definition type_traits.hpp:21
IsInvocable< Subscript, T, Index > IsSubscriptable
Definition subscript.hpp:21
std::is_invocable< F, Args... > IsInvocable
Definition type_traits.hpp:134
Definition subscript.hpp:11
constexpr decltype(auto) operator()(X &&a, Index const index) const
Definition subscript.hpp:14