Dune Core Modules (2.9.1)

functional.hh
1// -*- tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2// vi: set ts=8 sw=2 et sts=2:
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
5#ifndef DUNE_COMMON_STD_FUNCTIONAL_HH
6#define DUNE_COMMON_STD_FUNCTIONAL_HH
7
8#include <functional>
9
10namespace Dune
11{
12
13 namespace Std
14 {
15
22#if DUNE_HAVE_CXX_STD_IDENTITY
23 using std::identity;
24#else //DUNE_HAVE_CXX_STD_IDENTITY
25 struct identity {
26 template<class T>
27 constexpr T&& operator()(T&& t ) const noexcept {return std::forward<T>(t);}
28 };
29#endif
30 } // namespace Std
31
32} // namespace Dune
33
34#endif // #ifndef DUNE_COMMON_STD_FUNCTIONAL_HH
Dune namespace.
Definition: alignedallocator.hh:13
A function object type whose operator() returns its argument unchanged.
Definition: functional.hh:25
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 21, 23:30, 2024)