mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-10-17 13:39:26 +00:00
fix tuple construction, darkroom rgb & vector3d construction
This commit is contained in:
parent
c78e1d0e6d
commit
2e8b85e90c
53 changed files with 262 additions and 196 deletions
|
@ -14,14 +14,13 @@ namespace sprout {
|
|||
// append
|
||||
//
|
||||
template<typename Container, typename Input>
|
||||
struct append {
|
||||
public:
|
||||
typedef typename sprout::container_transform_traits<
|
||||
struct append
|
||||
: public sprout::container_transform_traits<
|
||||
Container
|
||||
>::template rebind_size<
|
||||
sprout::container_traits<Container>::static_size + sprout::container_traits<Input>::static_size
|
||||
>::type type;
|
||||
};
|
||||
>
|
||||
{};
|
||||
} // namespace result_of
|
||||
|
||||
namespace detail {
|
||||
|
|
|
@ -14,14 +14,14 @@ namespace sprout {
|
|||
// erase
|
||||
//
|
||||
template<typename Container>
|
||||
struct erase {
|
||||
static_assert(sprout::container_traits<Container>::static_size >= 1, "static_size >= 1");
|
||||
public:
|
||||
typedef typename sprout::container_transform_traits<
|
||||
struct erase
|
||||
: public sprout::container_transform_traits<
|
||||
Container
|
||||
>::template rebind_size<
|
||||
sprout::container_traits<Container>::static_size - 1
|
||||
>::type type;
|
||||
>
|
||||
{
|
||||
static_assert(sprout::container_traits<Container>::static_size >= 1, "static_size >= 1");
|
||||
};
|
||||
} // namespace result_of
|
||||
|
||||
|
|
|
@ -15,14 +15,14 @@ namespace sprout {
|
|||
// erase_n
|
||||
//
|
||||
template<std::size_t N, typename Container>
|
||||
struct erase_n {
|
||||
static_assert(sprout::container_traits<Container>::static_size >= N, "static_size >= N");
|
||||
public:
|
||||
typedef typename sprout::container_transform_traits<
|
||||
struct erase_n
|
||||
: public sprout::container_transform_traits<
|
||||
Container
|
||||
>::template rebind_size<
|
||||
sprout::container_traits<Container>::static_size - N
|
||||
>::type type;
|
||||
>
|
||||
{
|
||||
static_assert(sprout::container_traits<Container>::static_size >= N, "static_size >= N");
|
||||
};
|
||||
} // namespace result_of
|
||||
|
||||
|
|
|
@ -16,14 +16,13 @@ namespace sprout {
|
|||
// insert
|
||||
//
|
||||
template<typename Container, typename T, typename... Values>
|
||||
struct insert {
|
||||
public:
|
||||
typedef typename sprout::container_transform_traits<
|
||||
struct insert
|
||||
: public sprout::container_transform_traits<
|
||||
Container
|
||||
>::template rebind_size<
|
||||
sprout::container_traits<Container>::static_size + 1 + sizeof...(Values)
|
||||
>::type type;
|
||||
};
|
||||
>
|
||||
{};
|
||||
} // namespace result_of
|
||||
|
||||
namespace detail {
|
||||
|
|
|
@ -18,14 +18,13 @@ namespace sprout {
|
|||
// insert_n
|
||||
//
|
||||
template<std::size_t N, typename Container, typename T, typename... Values>
|
||||
struct insert_n {
|
||||
public:
|
||||
typedef typename sprout::container_transform_traits<
|
||||
struct insert_n
|
||||
: public sprout::container_transform_traits<
|
||||
Container
|
||||
>::template rebind_size<
|
||||
sprout::container_traits<Container>::static_size + (1 + sizeof...(Values)) * N
|
||||
>::type type;
|
||||
};
|
||||
>
|
||||
{};
|
||||
} // namespace result_of
|
||||
|
||||
namespace detail {
|
||||
|
|
|
@ -15,14 +15,13 @@ namespace sprout {
|
|||
// resize
|
||||
//
|
||||
template<std::size_t N, typename Container>
|
||||
struct resize {
|
||||
public:
|
||||
typedef typename sprout::container_transform_traits<
|
||||
struct resize
|
||||
: public sprout::container_transform_traits<
|
||||
Container
|
||||
>::template rebind_size<
|
||||
N
|
||||
>::type type;
|
||||
};
|
||||
>
|
||||
{};
|
||||
} // namespace result_of
|
||||
|
||||
namespace detail {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue