Skip to content

Commit 6caa031

Browse files
authored
Merge pull request #3 from libsigcplusplus/master
Updating from the source repo.
2 parents 93d7e47 + b8e5098 commit 6caa031

File tree

5 files changed

+40
-14
lines changed

5 files changed

+40
-14
lines changed

README

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ General information:
1212
depend on GTK+ or gtkmm.
1313

1414
Further information is available on the libsigc++ project home page:
15-
http://libsigc.sourceforge.net/
15+
https://libsigcplusplus.github.io/libsigcplusplus/
1616

1717

1818
License information:
@@ -24,11 +24,12 @@ License information:
2424
Contact information:
2525
Maintainer: mailto: murrayc@murrayc.com
2626
Maillist: mailto: libsigc-list@gnome.org
27-
Homepage: http://libsigc.sourceforge.net
27+
Homepage: https://libsigcplusplus.github.io/libsigcplusplus/
2828
Online reference documentation: https://developer.gnome.org/libsigc++/unstable/
2929
Download: http://ftp.gnome.org/pub/GNOME/sources/libsigc++/
3030
https://download.gnome.org/sources/libsigc++/
31-
Git: https://git.gnome.org/browse/libsigcplusplus/
31+
Git: https://github.com/libsigcplusplus/libsigcplusplus
32+
Bug reports: https://github.com/libsigcplusplus/libsigcplusplus/issues
3233

3334

3435
Overview of the distribution:
@@ -51,4 +52,5 @@ Overview of the distribution:
5152

5253
Compatibility:
5354

54-
Compatible compilers must support C++14, such as the decltype(auto) specifier.
55+
Compatible compilers must support C++17, such as the decltype(auto) specifier
56+
(from C++14) and std::invoke().

configure.ac

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
## along with this library. If not, see <http://www.gnu.org/licenses/>.
1717

1818
AC_INIT([libsigc++], [2.99.11],
19-
[http://bugzilla.gnome.org/enter_bug.cgi?product=libsigc%2B%2B],
20-
[libsigc++], [http://libsigc.sourceforge.net/])
19+
[https://github.com/libsigcplusplus/libsigcplusplus/issues/],
20+
[libsigc++], [https://libsigcplusplus.github.io/libsigcplusplus/])
2121
AC_PREREQ([2.59])
2222

2323
AC_CONFIG_SRCDIR([sigc++/sigc++.h])

libsigcplusplus.doap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ callback function, either global or a member function, regardless of
1212
whether it is static or virtual.
1313

1414
libsigc++ is also used by glibmm and gtkmm to wrap Glib and GTK+ signals.</description>
15-
<homepage rdf:resource="http://libsigc.sourceforge.net/" />
16-
<bug-database rdf:resource="http://bugzilla.gnome.org/browse.cgi?product=libsigc%2B%2B" />
15+
<homepage rdf:resource="https://libsigcplusplus.github.io/libsigcplusplus/" />
16+
<bug-database rdf:resource="https://github.com/libsigcplusplus/libsigcplusplus/issues/" />
1717
<mailing-list rdf:resource="mailto:libsigc-list@gnome.org" />
1818
<category rdf:resource="http://api.gnome.org/doap-extensions#core" />
1919
<programming-language>C++</programming-language>
@@ -29,7 +29,7 @@ libsigc++ is also used by glibmm and gtkmm to wrap Glib and GTK+ signals.</descr
2929
<maintainer>
3030
<foaf:Person>
3131
<foaf:name>Kjell Ahlstedt</foaf:name>
32-
<foaf:mbox rdf:resource="mailto:kjell.ahlstedt@bredband.net" />
32+
<foaf:mbox rdf:resource="mailto:kjellahlstedt@gmail.com" />
3333
<gnome:userid>kjellahl</gnome:userid>
3434
</foaf:Person>
3535
</maintainer>

sigc++/functors/slot.h

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,30 @@ namespace sigc
3333
namespace internal
3434
{
3535

36+
// Conversion between different types of function pointers with
37+
// reinterpret_cast can make gcc8 print a warning.
38+
// https://github.com/libsigcplusplus/libsigcplusplus/issues/1
39+
/** Returns the supplied bit pattern, interpreted as another type.
40+
*
41+
* When reinterpret_cast causes a compiler warning or error, this function
42+
* may work. Intended mainly for conversion between different types of pointers.
43+
*
44+
* Qualify calls with namespace names: sigc::internal::bitwise_equivalent_cast<>().
45+
* If you don't, indirect calls from another library that also contains a
46+
* bitwise_equivalent_cast<>() (perhaps glibmm), can be ambiguous due to ADL
47+
* (argument-dependent lookup).
48+
*/
49+
template <typename out_type, typename in_type>
50+
inline out_type bitwise_equivalent_cast(in_type in)
51+
{
52+
union {
53+
in_type in;
54+
out_type out;
55+
} u;
56+
u.in = in;
57+
return u.out;
58+
}
59+
3660
/** A typed slot_rep.
3761
* A typed slot_rep holds a functor that can be invoked from
3862
* slot::operator()(). visit_each() is used to visit the functor's
@@ -134,7 +158,7 @@ struct slot_call
134158
/** Forms a function pointer from call_it().
135159
* @return A function pointer formed from call_it().
136160
*/
137-
static hook address() { return reinterpret_cast<hook>(&call_it); }
161+
static hook address() { return sigc::internal::bitwise_equivalent_cast<hook>(&call_it); }
138162
};
139163

140164
} /* namespace internal */
@@ -192,7 +216,7 @@ class slot<T_return(T_arg...)> : public slot_base
192216
inline T_return operator()(type_trait_take_t<T_arg>... a) const
193217
{
194218
if (!empty() && !blocked()) {
195-
return std::invoke(reinterpret_cast<call_type>(slot_base::rep_->call_), slot_base::rep_, a...);
219+
return std::invoke(sigc::internal::bitwise_equivalent_cast<call_type>(slot_base::rep_->call_), slot_base::rep_, a...);
196220
}
197221

198222
return T_return();

sigc++/signal.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -322,12 +322,12 @@ struct signal_emit<T_return, void, T_arg...>
322322
return T_return();
323323
}
324324

325-
r_ = (reinterpret_cast<call_type>(it->rep_->call_))(it->rep_, a...);
325+
r_ = (sigc::internal::bitwise_equivalent_cast<call_type>(it->rep_->call_))(it->rep_, a...);
326326
for (++it; it != slots.end(); ++it)
327327
{
328328
if (it->empty() || it->blocked())
329329
continue;
330-
r_ = (reinterpret_cast<call_type>(it->rep_->call_))(it->rep_, a...);
330+
r_ = (sigc::internal::bitwise_equivalent_cast<call_type>(it->rep_->call_))(it->rep_, a...);
331331
}
332332
}
333333

@@ -365,7 +365,7 @@ struct signal_emit<void, void, T_arg...>
365365
if (slot.empty() || slot.blocked())
366366
continue;
367367

368-
(reinterpret_cast<call_type>(slot.rep_->call_))(slot.rep_, a...);
368+
(sigc::internal::bitwise_equivalent_cast<call_type>(slot.rep_->call_))(slot.rep_, a...);
369369
}
370370
}
371371
};

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