[libsigc++2/variadic_bind4] bind(): Correct the static_assert().



commit 592b9968c896d34288d6fdabbc7098a8d49df9b8
Author: Murray Cumming <murrayc murrayc com>
Date:   Wed Mar 2 22:40:30 2016 +0100

    bind(): Correct the static_assert().

 sigc++/adaptors/bind.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/sigc++/adaptors/bind.h b/sigc++/adaptors/bind.h
index 0668da7..a4a624b 100644
--- a/sigc++/adaptors/bind.h
+++ b/sigc++/adaptors/bind.h
@@ -137,8 +137,8 @@ struct bind_functor : public adapts<T_functor>
       constexpr auto t_args_size = std::tuple_size<tuple_type_args>::value;
       
       //Prevent calling tuple_start<> with values that will cause a compilation error.
-      static_assert(I_location < t_args_size,
-        "I_location must be less than the number of arguments.");
+      static_assert(I_location <= t_args_size,
+        "I_location must be less or equal to the number of arguments.");
 
       auto t_start = internal::tuple_start<I_location>(t_args);
       auto t_bound = internal::tuple_transform_each<internal::TransformEachInvoker>(bound_);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]