1
0
Fork 0
mirror of https://github.com/bolero-MURAKAMI/Sprout synced 2024-11-12 21:09:01 +00:00
Sprout/sprout/fixed_container/clone.hpp

23 lines
709 B
C++
Raw Normal View History

2011-09-03 13:26:26 +00:00
#ifndef SPROUT_FIXED_CONTAINER_CLONE_HPP
#define SPROUT_FIXED_CONTAINER_CLONE_HPP
2011-10-30 08:40:35 +00:00
#include <type_traits>
2011-09-03 13:26:26 +00:00
#include <sprout/config.hpp>
#include <sprout/fixed_container/traits.hpp>
2011-10-30 08:40:35 +00:00
#include <sprout/utility/forward.hpp>
2011-09-03 13:26:26 +00:00
namespace sprout {
//
// clone
//
template<typename Container>
2011-10-30 08:40:35 +00:00
SPROUT_CONSTEXPR inline typename sprout::fixed_container_traits<
typename std::remove_reference<Container>::type
>::clone_type clone(Container&& cont) {
typedef typename std::decay<Container>::type container_type;
return sprout::clone_functor<container_type>().template operator()(sprout::forward<Container>(cont));
2011-09-03 13:26:26 +00:00
}
} // namespace sprout
#endif // #ifndef SPROUT_FIXED_CONTAINER_CLONE_HPP