Skip to content

Commit 4b829ec

Browse files
committed
Fix some comments
1 parent ef8435a commit 4b829ec

File tree

5 files changed

+12
-8
lines changed

5 files changed

+12
-8
lines changed

sigc++/adaptors/hide.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ namespace sigc
6464
* @par Example:
6565
* @code
6666
* // multiple argument hiding ...
67-
* sigc::hide(sigc::hide(&foo))(1,2,3,4); // adds two dummy parameters at the back and calls
68-
foo(1,2)
67+
* // adds two dummy parameters at the back and calls foo(1,2)
68+
* sigc::hide(sigc::hide(&foo))(1,2,3,4);
6969
* @endcode
7070
7171
* sigc::hide_return() alters an arbitrary functor by
@@ -79,7 +79,6 @@ namespace sigc
7979
*
8080
* The following template arguments are used:
8181
* - @e I_location Zero-based position of the dummy parameter (@p -1 for the last parameter).
82-
* - @e T_type Type of the dummy parameter.
8382
* - @e T_functor Type of the functor to wrap.
8483
*
8584
* @ingroup hide

sigc++/functors/slot.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#include <sigc++/adaptors/adaptor_trait.h>
2525
#include <sigc++/functors/slot_base.h>
2626
#include <functional>
27-
2827
#include <memory>
2928

3029
namespace sigc
@@ -230,6 +229,12 @@ class slot<T_return(T_arg...)> : public slot_base
230229

231230
inline slot() = default;
232231

232+
// If you're tempted to add
233+
// template<typename T_functor,
234+
// std::enable_if_t<std::is_invocable_r_v<T_return, T_functor, T_arg...>, int> = 0>
235+
// to the constructor, see https://github.com/libsigcplusplus/libsigcplusplus/issues/79
236+
// It doesn't work well when sigc::slot is combined with sigc::hide().
237+
233238
/** Constructs a slot from an arbitrary functor.
234239
* @param func The desired functor the new slot should be assigned to.
235240
*/

sigc++/signal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ class signal_with_accumulator : public signal_base
469469
*/
470470
decltype(auto) make_slot() const
471471
{
472-
// TODO: Instead use std::result_of<> on the static emitter_type::emit()
472+
// TODO: Instead use std::invoke_result<> on the static emitter_type::emit()
473473
using result_type =
474474
typename internal::member_method_result<decltype(&signal_with_accumulator::emit)>::type;
475475
return bound_mem_functor<result_type (signal_with_accumulator::*)(type_trait_take_t<T_arg>...)

sigc++/tuple-utils/tuple_end.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ tuple_end(T&& t)
5858
{
5959
// We use std::decay_t<> because tuple_size is not defined for references.
6060
constexpr auto size = std::tuple_size<std::decay_t<T>>::value;
61-
static_assert(len <= size, "The tuple size must be less than or equal to the length.");
61+
static_assert(len <= size, "The tuple size must be greater than or equal to the length.");
6262

6363
if constexpr (len == 0)
6464
{

sigc++/tuple-utils/tuple_start.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ struct tuple_start_impl<T, std::index_sequence<I...>>
5959
{
6060
constexpr auto size = std::tuple_size<std::decay_t<T>>::value;
6161
constexpr auto len = sizeof...(I);
62-
static_assert(len <= size, "The tuple size must be less than or equal to the length.");
62+
static_assert(len <= size, "The tuple size must be greater than or equal to the length.");
6363

6464
using start = typename tuple_type_start<std::decay_t<T>, len>::type;
6565
return start(std::get<I>(std::forward<T>(t))...);
@@ -77,7 +77,7 @@ tuple_start(T&& t)
7777
{
7878
// We use std::decay_t<> because tuple_size is not defined for references.
7979
constexpr auto size = std::tuple_size<std::decay_t<T>>::value;
80-
static_assert(len <= size, "The tuple size must be less than or equal to the length.");
80+
static_assert(len <= size, "The tuple size must be greater than or equal to the length.");
8181

8282
return detail::tuple_start_impl<T, std::make_index_sequence<len>>::tuple_start(
8383
std::forward<T>(t));

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy