[sigc] default constructor needed for R in sigc::slot<R, A1, ...>
- From: Matthias Langer <mlangc gmx at>
- To: libsigc-list gnome org
- Subject: [sigc] default constructor needed for R in sigc::slot<R, A1, ...>
- Date: Wed, 21 Dec 2005 20:40:41 +0100
At least for libsigc++-2.0.15 the return type R in sigc::slot<R, ...>
needs to be default constructible. To verify this try
#include <sigc++/slot.h>
using sigc::slot; using sigc::ptr_fun;
class NoDefCtor
{
public:
NoDefCtor(int dummy) {}
};
NoDefCtor func()
{ return NoDefCtor(3); }
int main()
{
sigc::slot<NoDefCtor> tSlot(ptr_fun(func));
tSlot();
}
Now, i don't want to say that this is a bug, but i think it would be
nicer if the above code fragment compiles ...
Any comments ?
Matthias
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]