• R/O
  • SSH
  • HTTPS

sprout: 提交


Commit MetaInfo

修订版5274 (tree)
时间2018-05-29 22:47:56
作者bolero-murakami

Log Message

(empty log message)

更改概述

差异

--- sprout/tuple/tuple/tuple_decl.hpp (revision 5273)
+++ sprout/tuple/tuple/tuple_decl.hpp (revision 5274)
@@ -286,7 +286,7 @@
286286 template<sprout::index_t... Indexes>
287287 SPROUT_CXX14_CONSTEXPR void
288288 swap_impl(tuple& other, sprout::index_tuple<Indexes...>) {
289- sprout::swallow({sprout::unused(sprout::swap(base_type::template get<Indexes>(*this), base_type::template get<Indexes>(other)))...});
289+ sprout::swallow({(sprout::swap(base_type::template get<Indexes>(*this), base_type::template get<Indexes>(other)), 0)...});
290290 }
291291 template<typename Tuple>
292292 SPROUT_CXX14_CONSTEXPR void
@@ -297,7 +297,7 @@
297297 SPROUT_CXX14_CONSTEXPR void
298298 assign_impl(Tuple&& t, sprout::index_tuple<Indexes...>) {
299299 typedef typename std::decay<Tuple>::type type;
300- sprout::swallow({sprout::unused(base_type::template get<Indexes>(*this) = sprout::move(type::template get<Indexes>(SPROUT_FORWARD(Tuple, t))))...});
300+ sprout::swallow({((base_type::template get<Indexes>(*this) = sprout::move(type::template get<Indexes>(SPROUT_FORWARD(Tuple, t)))), 0)...});
301301 }
302302 template<sprout::index_t... Indexes>
303303 SPROUT_CONSTEXPR std::tuple<Types...>
--- sprout/utility/swallow.hpp (revision 5273)
+++ sprout/utility/swallow.hpp (revision 5274)
@@ -18,7 +18,6 @@
1818 //
1919 // example:
2020 // swallow({(void)pack, 0}...);
21- // swallow({unused(pack)...});
2221 // ((void)pack, ..., swallow); // right fold, since C++17
2322 // (swallow, ..., (void)pack); // left fold, since C++17
2423 //
@@ -49,7 +48,7 @@
4948 struct unused_t {
5049 public:
5150 template<typename... Args>
52- SPROUT_CONSTEXPR unused_t const&
51+ SPROUT_CONSTEXPR sprout::unused_t const&
5352 operator()(Args&&...) const SPROUT_NOEXCEPT {
5453 return *this;
5554 }
Show on old repository browser