Dune Core Modules (2.8.0)

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#ifndef DUNE_COMMON_STD_FUNCTIONAL_HH
4#define DUNE_COMMON_STD_FUNCTIONAL_HH
5
6#include <functional>
7
8namespace Dune
9{
10
11 namespace Std
12 {
13
20#if DUNE_HAVE_CXX_STD_IDENTITY
21 using std::identity;
22#else //DUNE_HAVE_CXX_STD_IDENTITY
23 struct identity {
24 template<class T>
25 constexpr T&& operator()(T&& t ) const noexcept {return std::forward<T>(t);}
26 };
27#endif
28 } // namespace Std
29
30} // namespace Dune
31
32#endif // #ifndef DUNE_COMMON_STD_FUNCTIONAL_HH
Dune namespace.
Definition: alignedallocator.hh:11
A function object type whose operator() returns its argument unchanged.
Definition: functional.hh:23
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 21, 23:30, 2024)