[libsigc++2/variadic_bind2: 57/68] partial build fix
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsigc++2/variadic_bind2: 57/68] partial build fix
- Date: Tue, 1 Mar 2016 21:48:30 +0000 (UTC)
commit a52ca174a5f609ce7b7cdbf0b694a03433c8b2b1
Author: Marcin Kolny <marcin kolny gmail com>
Date: Mon Jan 18 23:29:47 2016 +0100
partial build fix
sigc++/adaptors/bind.h | 3 +--
sigc++/tuple_transform_each.h | 4 ++--
2 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/sigc++/adaptors/bind.h b/sigc++/adaptors/bind.h
index d2d66fc..b671021 100644
--- a/sigc++/adaptors/bind.h
+++ b/sigc++/adaptors/bind.h
@@ -94,8 +94,7 @@ struct TransformEachInvoker
{
//We take T_element as non-const because invoke() is not const.
static
- decltype(auto)
- transform(T_element& element) {
+ auto transform(T_element& element) -> decltype(element.invoke())& {
return element.invoke();
}
};
diff --git a/sigc++/tuple_transform_each.h b/sigc++/tuple_transform_each.h
index d64fe85..a55a485 100644
--- a/sigc++/tuple_transform_each.h
+++ b/sigc++/tuple_transform_each.h
@@ -99,7 +99,7 @@ struct tuple_transform_each_impl
using element_type = typename std::tuple_element<index, T_current>::type;
auto& from = std::get<index>(t_original);
- const auto element = T_transformer<element_type>::transform(from);
+ const auto& element = T_transformer<element_type>::transform(from);
const auto t_element = std::make_tuple(element);
const auto t_start = tuple_start<index>(t);
@@ -131,7 +131,7 @@ struct tuple_transform_each_impl<T_transformer, 0>
constexpr std::size_t index = 0;
using element_type = typename std::tuple_element<index, T_original>::type;
- const auto element = T_transformer<element_type>::transform(std::get<index>(t_original));
+ const auto& element = T_transformer<element_type>::transform(std::get<index>(t_original));
const auto tuple_element = std::make_tuple(element);
const auto tuple_rest = tuple_cdr(t);
return std::tuple_cat(tuple_element, tuple_rest);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]