From 655a40cd36743481176b8cc39331c84e74b16f32 Mon Sep 17 00:00:00 2001 From: Naios Date: Thu, 2 Jul 2015 00:13:45 +0200 Subject: [PATCH] size_t -> std::size_t --- include/Continuable.h | 14 +++++++------- include/WeakCallbackContainer.h | 6 +++--- include/functional_unwrap.hpp | 15 ++++++++------- test.cpp | 2 +- 4 files changed, 19 insertions(+), 18 deletions(-) diff --git a/include/Continuable.h b/include/Continuable.h index 8d70703..b4cc698 100644 --- a/include/Continuable.h +++ b/include/Continuable.h @@ -192,7 +192,7 @@ public: /// Placeholder template - 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 + template 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 + template struct multiple_result_maker; - template + template struct multiple_result_maker, fu::identity> { typedef fu::identity arguments_t; typedef fu::identity partial_results_t; - static size_t const size = Position; + static std::size_t const size = Position; }; - template + template struct multiple_result_maker : public multiple_result_maker< Position + 1, diff --git a/include/WeakCallbackContainer.h b/include/WeakCallbackContainer.h index 440949b..3794052 100644 --- a/include/WeakCallbackContainer.h +++ b/include/WeakCallbackContainer.h @@ -29,9 +29,9 @@ class WeakCallbackContainer { std::shared_ptr self_reference; - typedef size_t handle_t; + typedef std::size_t handle_t; - size_t handle; + std::size_t handle; std::unordered_map 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 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) { diff --git a/include/functional_unwrap.hpp b/include/functional_unwrap.hpp index ff99fb4..05da22f 100644 --- a/include/functional_unwrap.hpp +++ b/include/functional_unwrap.hpp @@ -27,6 +27,7 @@ #include #include #include +#include namespace fu { @@ -35,25 +36,25 @@ namespace fu struct identity { }; /// Sequence class which is used to carry parameter packs of unsigned integers. - template + template struct sequence { }; - /// The Sequence generator generates a sequence of numbers with the given size. - template + /// The Sequence generator generates a sequence of ascending numbers with the given size. + template struct sequence_generator; - template + template struct sequence_generator<0, Stack...> { typedef sequence type; }; - template + template struct sequence_generator : public sequence_generator { }; /// Sequence generator alias - template + template using sequence_of_t = typename sequence_generator::type; namespace detail @@ -216,7 +217,7 @@ namespace fu template struct invoker; - template + template struct invoker> { template diff --git a/test.cpp b/test.cpp index 42a36b9..1482efa 100644 --- a/test.cpp +++ b/test.cpp @@ -96,7 +96,7 @@ void test_unwrap(std::string const& msg) std::cout << msg << " is unwrappable: " << (fu::is_unwrappable::value ? "true" : "false") << std::endl; } /* -template +template struct Apply { template static inline auto apply(F && f, T && t, A &&... a)