Line data Source code
1 0 : // Distributed under the MIT License.
2 : // See LICENSE.txt for details.
3 :
4 : #pragma once
5 :
6 : #include "DataStructures/DataBox/Access.hpp"
7 : #include "DataStructures/DataBox/DataBox.hpp"
8 :
9 : namespace db {
10 : /// @{
11 : /// \brief Convert a `db::DataBox` to a `db::Access`.
12 : template <typename TagsList>
13 1 : const Access& as_access(const DataBox<TagsList>& box) {
14 : return static_cast<const Access&>(box);
15 : }
16 :
17 : template <typename TagsList>
18 1 : Access& as_access(DataBox<TagsList>& box) {
19 : return static_cast<Access&>(box);
20 : }
21 : /// @}
22 : } // namespace db
|