Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-15 10:26:39

0001 /// \file
0002 // Range v3 library
0003 //
0004 //  Copyright Eric Niebler 2013-present
0005 //
0006 //  Use, modification and distribution is subject to the
0007 //  Boost Software License, Version 1.0. (See accompanying
0008 //  file LICENSE_1_0.txt or copy at
0009 //  http://www.boost.org/LICENSE_1_0.txt)
0010 //
0011 // Project home: https://github.com/ericniebler/range-v3
0012 //
0013 #ifndef RANGES_V3_FUNCTIONAL_IDENTITY_HPP
0014 #define RANGES_V3_FUNCTIONAL_IDENTITY_HPP
0015 
0016 #include <range/v3/detail/config.hpp>
0017 
0018 #include <range/v3/detail/prologue.hpp>
0019 
0020 namespace ranges
0021 {
0022     /// \addtogroup group-functional
0023     /// @{
0024     struct identity
0025     {
0026         template<typename T>
0027         constexpr T && operator()(T && t) const noexcept
0028         {
0029             return (T &&) t;
0030         }
0031         using is_transparent = void;
0032     };
0033 
0034     /// \cond
0035     using ident RANGES_DEPRECATED("Replace uses of ranges::ident with ranges::identity") =
0036         identity;
0037     /// \endcond
0038 
0039     namespace cpp20
0040     {
0041         using ranges::identity;
0042     }
0043     /// @}
0044 } // namespace ranges
0045 
0046 #include <range/v3/detail/epilogue.hpp>
0047 
0048 #endif