Code Monkey home page Code Monkey logo

Comments (5)

zajo avatar zajo commented on August 24, 2024 1

Figured out a way to put back the static_assert without breaking use with lambdas, see 4a11277.

from leaf.

zajo avatar zajo commented on August 24, 2024

I'd like to get some more feedback that this is a problem before removing the static_assert, IMO the better diagnostics outweighs this potential problem. Do you mind giving me a bit more context, what lead you to hit this problem?

from leaf.

mikezackles avatar mikezackles commented on August 24, 2024

I totally understand not wanting to remove the static_assert, and I don't think you should (unless there's some equivalent alternative). My thought was to add some additional unchecked macros for this situation, but I can also understand not wanting to complicate things. Something along the lines of BOOST_LEAF_ASSIGN_UNCHECKED etc.

I'm experimenting with porting some code over from Outcome that uses lambdas fairly liberally, and creating named variables for each is a good bit of extra work/clutter. If I understand correctly this is an issue with passing lambdas inline to any function that might fail, which seems like a reasonably common pattern.

For me it's easy enough to define my own macros until I can move to c++20, but it seemed like something that might be nice to have documented in the issues for other people that run into it. No big deal if there's no fix on your end.

from leaf.

zajo avatar zajo commented on August 24, 2024

I got convinced that this is a problem. It is now fixed on develop, I also added a unit test. See e9eb032. Thanks!

from leaf.

mikezackles avatar mikezackles commented on August 24, 2024

Awesome! Thank you!

from leaf.

Related Issues (20)

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.