![]() |
|
|||
File indexing completed on 2025-08-06 08:10:17
0001 // This file is part of the Acts project. 0002 // 0003 // Copyright (C) 2021 CERN for the benefit of the Acts project 0004 // 0005 // This Source Code Form is subject to the terms of the Mozilla Public 0006 // License, v. 2.0. If a copy of the MPL was not distributed with this 0007 // file, You can obtain one at http://mozilla.org/MPL/2.0/. 0008 0009 #pragma once 0010 0011 #if __cplusplus >= 202002L 0012 0013 #include <functional> 0014 0015 namespace Acts { 0016 using Identity = std::identity; 0017 } 0018 0019 #else 0020 0021 #include <utility> 0022 0023 namespace Acts { 0024 0025 /// @brief Function object which maps a value to itself by perfect forwarding 0026 /// This is a backport of C++20's std::identity 0027 struct Identity { 0028 template <typename T> 0029 constexpr auto operator()(T &&v) const { 0030 return std::forward<T>(v); 0031 } 0032 }; 0033 0034 } // namespace Acts 0035 0036 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |