fix make_array: explicit conversion to T

This commit is contained in:
bolero-MURAKAMI 2013-08-23 12:08:17 +09:00
parent ce4a65b2ad
commit 2dc912522b
3 changed files with 19 additions and 19 deletions

View file

@ -14,9 +14,13 @@
#endif
#include "./all_of.cpp"
#include "./all_of_equal.cpp"
#include "./any_of.cpp"
#include "./any_of_equal.cpp"
#include "./none_of.cpp"
#include "./none_of_equal.cpp"
#include "./one_of.cpp"
#include "./one_of_equal.cpp"
#include "./find.cpp"
#include "./find_if.cpp"
#include "./find_if_not.cpp"
@ -34,6 +38,10 @@
#include "./partition_point.cpp"
#include "./is_sorted.cpp"
#include "./is_sorted_until.cpp"
#include "./is_increasing.cpp"
#include "./is_decreasing.cpp"
#include "./is_strictly_increasing.cpp"
#include "./is_strictly_decreasing.cpp"
#include "./lower_bound.cpp"
#include "./upper_bound.cpp"
#include "./equal_range.cpp"
@ -48,15 +56,7 @@
#include "./max_element.cpp"
#include "./minmax_element.cpp"
#include "./lexicographical_compare.cpp"
#include "./all_of_equal.cpp"
#include "./any_of_equal.cpp"
#include "./none_of_equal.cpp"
#include "./one_of_equal.cpp"
#include "./tristate_lexicographical_compare.cpp"
#include "./is_increasing.cpp"
#include "./is_decreasing.cpp"
#include "./is_strictly_increasing.cpp"
#include "./is_strictly_decreasing.cpp"
#include "./clamp.cpp"
#ifdef TESTSPR_CPP_INCLUDE_DISABLE_SPROUT_LIBS_ALGORITHM_TEST_NON_MODIFYIING_CPP

View file

@ -10,9 +10,13 @@
#include <sprout/config.hpp>
#include <sprout/algorithm/all_of.hpp>
#include <sprout/algorithm/all_of_equal.hpp>
#include <sprout/algorithm/any_of.hpp>
#include <sprout/algorithm/any_of_equal.hpp>
#include <sprout/algorithm/none_of.hpp>
#include <sprout/algorithm/none_of_equal.hpp>
#include <sprout/algorithm/one_of.hpp>
#include <sprout/algorithm/one_of_equal.hpp>
#include <sprout/algorithm/find.hpp>
#include <sprout/algorithm/find_if.hpp>
#include <sprout/algorithm/find_if_not.hpp>
@ -30,13 +34,17 @@
#include <sprout/algorithm/partition_point.hpp>
#include <sprout/algorithm/is_sorted.hpp>
#include <sprout/algorithm/is_sorted_until.hpp>
#include <sprout/algorithm/is_increasing.hpp>
#include <sprout/algorithm/is_decreasing.hpp>
#include <sprout/algorithm/is_strictly_increasing.hpp>
#include <sprout/algorithm/is_strictly_decreasing.hpp>
#include <sprout/algorithm/lower_bound.hpp>
#include <sprout/algorithm/upper_bound.hpp>
#include <sprout/algorithm/equal_range.hpp>
#include <sprout/algorithm/binary_search.hpp>
#include <sprout/algorithm/includes.hpp>
#include <sprout/algorithm/is_heap.hpp>
#include <sprout/algorithm/is_heap_until.hpp>
#include <sprout/algorithm/is_heap.hpp>
#include <sprout/algorithm/min.hpp>
#include <sprout/algorithm/max.hpp>
#include <sprout/algorithm/minmax.hpp>
@ -44,15 +52,7 @@
#include <sprout/algorithm/max_element.hpp>
#include <sprout/algorithm/minmax_element.hpp>
#include <sprout/algorithm/lexicographical_compare.hpp>
#include <sprout/algorithm/all_of_equal.hpp>
#include <sprout/algorithm/any_of_equal.hpp>
#include <sprout/algorithm/none_of_equal.hpp>
#include <sprout/algorithm/one_of_equal.hpp>
#include <sprout/algorithm/tristate_lexicographical_compare.hpp>
#include <sprout/algorithm/is_increasing.hpp>
#include <sprout/algorithm/is_decreasing.hpp>
#include <sprout/algorithm/is_strictly_increasing.hpp>
#include <sprout/algorithm/is_strictly_decreasing.hpp>
#include <sprout/algorithm/find_intersection.hpp>
#include <sprout/algorithm/find_difference.hpp>
#include <sprout/algorithm/find_symmetric_difference.hpp>

View file

@ -23,7 +23,7 @@ namespace sprout {
template<typename T, typename... Types>
inline SPROUT_CONSTEXPR sprout::array<T, sizeof...(Types)>
make_array(Types&&... args) {
return sprout::array<T, sizeof...(Types)>{{sprout::forward<Types>(args)...}};
return sprout::array<T, sizeof...(Types)>{{T(sprout::forward<Types>(args))...}};
}
//
@ -39,7 +39,7 @@ namespace sprout {
typename sprout::common_decay<Types&&...>::type,
sizeof...(Types)
> type;
return type{{sprout::forward<Types>(args)...}};
return type{{typename sprout::common_decay<Types&&...>::type(sprout::forward<Types>(args))...}};
}
//