mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
fixed_container_traits 仕様変更
This commit is contained in:
parent
9a229b824f
commit
2168f05433
43 changed files with 174 additions and 202 deletions
|
@ -1,43 +1,30 @@
|
|||
#ifndef SPROUT_FIXED_CONTAINER_REMAKE_CLONE_HPP
|
||||
#define SPROUT_FIXED_CONTAINER_REMAKE_CLONE_HPP
|
||||
|
||||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/utility/forward.hpp>
|
||||
|
||||
namespace sprout {
|
||||
//
|
||||
// remake_clone
|
||||
//
|
||||
template<typename Container, typename Other, typename... Args>
|
||||
inline typename sprout::fixed_container_traits<Container>::clone_type remake_clone(
|
||||
Other& other,
|
||||
SPROUT_CONSTEXPR inline typename sprout::fixed_container_traits<
|
||||
typename std::remove_reference<Container>::type
|
||||
>::clone_type remake_clone(
|
||||
Other&& other,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type size,
|
||||
Args const&... args
|
||||
Args&&... args
|
||||
)
|
||||
{
|
||||
return sprout::remake_clone_functor<Container>().template operator()(other, size, args...);
|
||||
}
|
||||
template<typename Container, typename Other, typename... Args>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fixed_container_traits<Container>::clone_type remake_clone(
|
||||
Other const& other,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type size,
|
||||
Args const&... args
|
||||
)
|
||||
{
|
||||
return sprout::remake_clone_functor<Container>().template operator()(other, size, args...);
|
||||
}
|
||||
|
||||
//
|
||||
// remake_cclone
|
||||
//
|
||||
template<typename Container, typename Other, typename... Args>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fixed_container_traits<Container>::clone_type remake_cclone(
|
||||
Other const& other,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type size,
|
||||
Args const&... args
|
||||
)
|
||||
{
|
||||
return sprout::remake_clone_functor<Container>().template operator()(other, size, args...);
|
||||
typedef typename std::remove_reference<Container>::type container_type;
|
||||
return sprout::remake_clone_functor<container_type>().template operator()(
|
||||
sprout::forward<Other>(other),
|
||||
size,
|
||||
sprout::forward<Args>(args)...
|
||||
);
|
||||
}
|
||||
} // namespace sprout
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue