Skip to content

Commit dae8f58

Browse files
committed
scoped_connection: Remove [[nodiscard]]
Can cause unwarranted warnings from some compilers, or compiler versions. Fixes #102
1 parent e98e131 commit dae8f58

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

sigc++/scoped_connection.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,14 @@ namespace sigc
8383
struct SIGC_API scoped_connection final
8484
{
8585
/** Constructs an empty scoped connection object. */
86-
[[nodiscard]] scoped_connection() noexcept = default;
86+
scoped_connection() noexcept = default;
8787

8888
/** Constructs a scoped connection object from an unscoped connection object.
8989
* The source connection still refers to the slot and can manually disconnect.
9090
* @param c The connection object to make a copy from, whose slot weʼll
9191
* automatically disconnect when the scoped_connection object is destroyed.
9292
*/
93-
[[nodiscard]] scoped_connection(connection c) noexcept;
93+
scoped_connection(connection c) noexcept;
9494

9595
/** Overrides this scoped connection object copying an unscoped connection.
9696
* The current slot, if any, will be disconnect()ed before being replaced.
@@ -127,17 +127,17 @@ struct SIGC_API scoped_connection final
127127
/** Returns whether the connection is still active.
128128
* @return @p false if the connection is still active.
129129
*/
130-
[[nodiscard]] bool empty() const noexcept;
130+
bool empty() const noexcept;
131131

132132
/** Returns whether the connection is still active.
133133
* @return @p true if the connection is still active.
134134
*/
135-
[[nodiscard]] bool connected() const noexcept;
135+
bool connected() const noexcept;
136136

137137
/** Returns whether the connection is blocked.
138138
* @return @p true if the connection is blocked.
139139
*/
140-
[[nodiscard]] bool blocked() const noexcept;
140+
bool blocked() const noexcept;
141141

142142
/** Sets or unsets the blocking state of this connection.
143143
* See slot_base::block() for details.
@@ -157,13 +157,13 @@ struct SIGC_API scoped_connection final
157157
/** Returns whether the connection is still active.
158158
* @return @p true if the connection is still active.
159159
*/
160-
[[nodiscard]] explicit operator bool() const noexcept;
160+
explicit operator bool() const noexcept;
161161

162162
/** Releases the connection from a scoped connection object.
163163
* The scoped connection will no longer refer to / disconnect the slot.
164164
* @return An unscoped connection object referring to the same slot.
165165
*/
166-
[[nodiscard]] connection release() noexcept;
166+
connection release() noexcept;
167167

168168
private:
169169
sigc::connection conn_;

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