cMHN 1.2
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>
13 requires requires { declval<X>()[declval<Index const>()]; }
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 concepts.hpp:31
Definition subscript.hpp:21
Definition cholesky.hpp:10
Size Index
Definition basics.hpp:32
Definition subscript.hpp:11