/// \file // Range v3 library // // Copyright Andrey Diduh 2019 // // Use, modification and distribution is subject to the // Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Project home: https://github.com/ericniebler/range-v3 // #ifndef RANGES_V3_VIEW_ADDRESSOF_HPP #define RANGES_V3_VIEW_ADDRESSOF_HPP #include #include #include #include #include #include namespace ranges { /// \addtogroup group-views /// @{ namespace views { struct addressof_fn { private: struct take_address { template constexpr V * operator()(V & value) const noexcept { return detail::addressof(value); } }; public: CPP_template(typename Rng)( // requires viewable_range && input_range && // std::is_lvalue_reference>::value) // constexpr auto CPP_auto_fun(operator())(Rng && rng)(const)( return transform(all(static_cast(rng)), take_address{})) }; /// \relates addressof_fn /// \ingroup group-views RANGES_INLINE_VARIABLE(view, addressof) } // namespace views /// @} } // namespace ranges #endif // RANGES_V3_VIEW_ADDRESSOF_HPP