After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 765214 - 3.0: Use of C++ concepts
3.0: Use of C++ concepts
Status: RESOLVED WONTFIX
Product: libsigc++
Classification: Bindings
Component: general
2.99.x
Other Linux
: Normal normal
: ---
Assigned To: libsigc++ maintainer(s)
libsigc++ maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-04-18 14:10 UTC by Murray Cumming
Modified: 2018-07-10 22:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
0001-concepts-bind-Use-the-origin-Copy_constructible-C-co.patch (2.49 KB, patch)
2016-04-18 14:10 UTC, Murray Cumming
none Details | Review

Description Murray Cumming 2016-04-18 14:10:47 UTC
Created attachment 326259 [details] [review]
0001-concepts-bind-Use-the-origin-Copy_constructible-C-co.patch

Even though concepts won't be in C++17, I'm still interested in trying them. And they can even be compatible with regular C++ when we use this syntax, if we use and ugly #define to typename:

#define SomeConcept typename

template<SomeConcept Thing>
class Stuff
{
  Thing thing;
}

g++ 6 (not yet released) supports C++ concepts via the -std=c++1z and -fconcepts options (I think both are necessary, but I'm not sure), and the Origin library provides some concepts:
https://github.com/asutton/origin

Here is a small patch to just use one concept to make sure that bind() takes copyable arguments to bind. It's not particularly useful.

I was hoping to somehow mark the various T_Functor types as invokable, but I can't find a useful way of using Origin::Invokable.
Comment 1 Marcin Kolny (IRC: loganek) 2016-04-22 16:17:49 UTC
What I really like in sigc++ library, is that it's not depended on third-party libraries, so I'd rather avoid using Origin library.
Moreover, as you said, concepts is not a part of C++17, and nobody knows when this feature will get into the language.
Instead of waiting, we could do the same with static_assert's and enable_if's.
If you agree that we should go that way, I could provide patches.
Comment 2 Murray Cumming 2016-04-22 16:27:10 UTC
Yes, of course, we would not really depend on the origin library. It's just a way to get concept definitions now that are likely to be correct, and generic. When we use concepts we might use official concept from the C++ standard library, and some of our own.

For static_asserts() and suchlike, yes, that would be interesting:
https://bugzilla.gnome.org/show_bug.cgi?id=759245
Comment 3 André Klapper 2018-07-10 22:47:49 UTC
According to https://libsigcplusplus.github.io/libsigcplusplus/devel.html the issue tracker of libsigc++ is located at https://github.com/libsigcplusplus/libsigcplusplus/issues nowadays.

If the problem in this bug report still exists in a recent version of libsigc++ please file this bug report in GitHub.

Closing this report as WONTFIX as part of Bugzilla Housekeeping, as we plan to shut down GNOME Bugzilla in favor of GNOME Gitlab.