/*============================================================================= Copyright (c) 2011-2013 Bolero MURAKAMI https://github.com/bolero-MURAKAMI/Sprout Distributed under 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) =============================================================================*/ #ifndef SPROUT_RANGE_ADAPTOR_DEEP_COPIED_HPP #define SPROUT_RANGE_ADAPTOR_DEEP_COPIED_HPP #include #include #include #include namespace sprout { namespace adaptors { // // deep_copied_forwarder // class deep_copied_forwarder {}; // // deep_copied // namespace { SPROUT_STATIC_CONSTEXPR sprout::adaptors::deep_copied_forwarder deep_copied = {}; } // anonymous-namespace // // operator| // template inline SPROUT_CONSTEXPR typename sprout::container_construct_traits< typename std::remove_reference::type >::copied_type operator|(Range&& lhs, sprout::adaptors::deep_copied_forwarder const&) { return sprout::deep_copy(sprout::forward(lhs)); } } // namespace adaptors } // namespace sprout #endif // #ifndef SPROUT_RANGE_ADAPTOR_DEEP_COPIED_HPP