fix tuple construction, darkroom rgb & vector3d construction

This commit is contained in:
bolero-MURAKAMI 2013-03-27 02:02:16 +09:00
commit 2e8b85e90c
53 changed files with 262 additions and 196 deletions

View file

@ -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 {

View file

@ -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

View file

@ -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

View file

@ -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 {

View file

@ -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 {

View file

@ -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 {