Comments (7)
I have to agree with this, the fact that the type of the caller appears in the type of the delegate seems to defeat the whole purpose of the delegate...
If I say, for example
void set_delegate(delegate<void (*) (int, int)>) {
//...store the delegate somewhere
}
then
set_delegate(make_delegate(&MyClass::foo, myClassInstance));
does not compile.
from delegates.
+1, bitten with this.
You should at least change the examples on the front page because they give hope that the delegate is able to do this.
from delegates.
@marcmo Wouldn't C++17's template argument deduction help overcome this ?
from delegates.
you are of course right guys...I overlooked this in my enthusiasm to get rid of some template syntax by using macros...
will probably switch back to using the more verbose but working syntax. @jcelerier C++17 might help but then again this library was meant to be used in scenarios where you cannot expect more then C++98 => highly portable but still really good performance.
from delegates.
just noticed this as well, any plans on maybe providing a working branch or tag a certain commit in which it was working as described in this issue?
from delegates.
Hi @koemeet, I will provide an updated version soon. totally forgot about it.
from delegates.
Hi @marcmo! Was this issue dropped or do you still have plans to update the class?
from delegates.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from delegates.