Comments (7)
Also check out anyfunction.cpp and the crl library, if you're interested in delegates, signals and slots.
from generic.
If you want an example for something, just tell me and I'll write one.
from generic.
I use the new forwarder.hpp mostly as most std::function implementations have improved to the point where I thought the old delegate.hpp was obsolete.
from generic.
Don't forget anyfunction.hpp as well. It's the best thing.
from generic.
Ok, cool! Thanks . I will definitely check them out! :)
from generic.
I've finally had some time off work to have a look at any_function and wow it is amazing the kind of things you can do with it :o
However, it doesn't look like it supports equality comparison which delegate does.
Also, the current version of delegate.hpp incorrectly fails the equality comparison between two delegate that were constructed from the same inlined function. Adding the following code into operator== fixes the problem. I believe that was actually there a long time ago but it was then removed?
if (store_size_ && rhs.store_size_)
return (std::memcmp(store_.get(), rhs.store_.get(), store_size_) == 0) && (stub_ptr_ == rhs.stub_ptr_);
I really want to thank you for making these source code open sourced. I've learnt so much about C++ from your library!
from generic.
ok, I'll add since it's already obsolete :) Adding memcmp into c++ is a bad idea though. It works on your platform, but how about some other? Delegates are in general very weak when it comes to comparisons.
from generic.
Related Issues (3)
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 generic.