Coder Social home page Coder Social logo

once's People

Contributors

misje avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

once's Issues

Add good use cases to README and add example program

In order to easily convey the purpose of once a few good use cases should be presented in the README. Example test code should implement them. Personally I have a hard time finding good examples that are not in proprietary code, so help is appreciated!

AutoDisconnecter stores refrence to functor object instead of object itself

Hi! First of all thanks for your small helper. I was also surprised that this functionality has still not included in QT.
The problem is that the member AutoDisconnecter::func is treated as a reference and therefore it saves a reference to the functor object which is not saved elsewhere.
No idea why. You use "Func &&func" so Func should be deduced to the type itself.
It can be easily verified by static_assert( !std::is_reference< decltype( func ) >::value , ""), which won't compile.
The solution can be replacing the member with
std::remove_reference_t< Func > func;
Plus you need to remove const from operator () and call() as they call not-const callable of its member.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.