size_t -> std::size_t

This commit is contained in:
Naios 2015-07-02 00:13:45 +02:00
parent b2780a7abb
commit 655a40cd36
4 changed files with 19 additions and 18 deletions

View File

@ -192,7 +192,7 @@ public:
/// Placeholder
template<typename... _CTy>
Continuable& some(size_t const count, _CTy&&...)
Continuable& some(std::size_t const count, _CTy&&...)
{
return *this;
}
@ -340,10 +340,10 @@ namespace detail
};
/// Position wrapper class to pass ints as type
template<size_t Position, typename Tuple>
template<std::size_t Position, typename Tuple>
struct partial_result
{
static size_t const position = Position;
static std::size_t const position = Position;
typedef Tuple tuple;
};
@ -443,20 +443,20 @@ namespace detail
return remove_void_trait(box_continuable_trait(std::forward<_CTy>(functional)));
}
template<size_t Position, typename Args, typename Pack, typename... Rest>
template<std::size_t Position, typename Args, typename Pack, typename... Rest>
struct multiple_result_maker;
template<size_t Position, typename... Args, typename... Pack>
template<std::size_t Position, typename... Args, typename... Pack>
struct multiple_result_maker<Position, fu::identity<Args...>, fu::identity<Pack...>>
{
typedef fu::identity<Args...> arguments_t;
typedef fu::identity<Pack...> partial_results_t;
static size_t const size = Position;
static std::size_t const size = Position;
};
template<size_t Position, typename Args, typename Pack, typename Next, typename... Rest>
template<std::size_t Position, typename Args, typename Pack, typename Next, typename... Rest>
struct multiple_result_maker<Position, Args, Pack, Next, Rest...>
: public multiple_result_maker<
Position + 1,

View File

@ -29,9 +29,9 @@ class WeakCallbackContainer
{
std::shared_ptr<WeakCallbackContainer> self_reference;
typedef size_t handle_t;
typedef std::size_t handle_t;
size_t handle;
std::size_t handle;
std::unordered_map<decltype(handle), boost::any> container;
@ -44,7 +44,7 @@ class WeakCallbackContainer
// Creates a weak proxy callback which prevents invoking to an invalid context.
// Removes itself from the owner with the given handler.
static callback_of_t<_CTy> CreateProxy(std::weak_ptr<WeakCallbackContainer> const& weak_owner,
size_t const handle, weak_callback_of_t<_CTy> const& weak_callback)
std::size_t const handle, weak_callback_of_t<_CTy> const& weak_callback)
{
return [=](Args&&... args)
{

View File

@ -27,6 +27,7 @@
#include <functional>
#include <type_traits>
#include <utility>
#include <cstddef>
namespace fu
{
@ -35,25 +36,25 @@ namespace fu
struct identity { };
/// Sequence class which is used to carry parameter packs of unsigned integers.
template<size_t...>
template<std::size_t...>
struct sequence { };
/// The Sequence generator generates a sequence of numbers with the given size.
template<size_t...>
/// The Sequence generator generates a sequence of ascending numbers with the given size.
template<std::size_t...>
struct sequence_generator;
template<size_t... Stack>
template<std::size_t... Stack>
struct sequence_generator<0, Stack...>
{
typedef sequence<Stack...> type;
};
template<size_t Position, size_t... Stack>
template<std::size_t Position, std::size_t... Stack>
struct sequence_generator<Position, Stack...>
: public sequence_generator<Position - 1, Position - 1, Stack...> { };
/// Sequence generator alias
template<size_t Size>
template<std::size_t Size>
using sequence_of_t = typename sequence_generator<Size>::type;
namespace detail
@ -216,7 +217,7 @@ namespace fu
template<typename Sequence>
struct invoker;
template<size_t... Sequence>
template<std::size_t... Sequence>
struct invoker<sequence<Sequence...>>
{
template<typename _FTy, typename _TTy>

View File

@ -96,7 +96,7 @@ void test_unwrap(std::string const& msg)
std::cout << msg << " is unwrappable: " << (fu::is_unwrappable<T...>::value ? "true" : "false") << std::endl;
}
/*
template<size_t N>
template<std::size_t N>
struct Apply {
template<typename F, typename T, typename... A>
static inline auto apply(F && f, T && t, A &&... a)