Code Monkey home page Code Monkey logo

Comments (9)

Seng-Jik avatar Seng-Jik commented on June 28, 2024

我觉得也是自动检测

from cm-document.

ice1000 avatar ice1000 commented on June 28, 2024

Get

from cm-document.

ice1000 avatar ice1000 commented on June 28, 2024

那你觉得,是生成一个struct然后传入被捕获变量好,还是把被捕获变量挨个传入好?

from cm-document.

ice1000 avatar ice1000 commented on June 28, 2024

@SmallLuma

from cm-document.

Seng-Jik avatar Seng-Jik commented on June 28, 2024

挨个传入吧。
生成一个struct感觉要多写很多。
或者我们可以用元组,不过目前还没有定这个语法。

from cm-document.

ice1000 avatar ice1000 commented on June 28, 2024

元组不就是动态生成struct吗。。。

from cm-document.

ice1000 avatar ice1000 commented on June 28, 2024

clang的做法是生成了一个类来放。好处就是,在把capture了变量的lambda传递给其他函数时,这个生成的类也要跟着一起被传递出去。那么如果只有一个类,那增加的参数也就只有一个。挨个传入的话就是动态确定的。

我现在也拿不定主意,其实。

from cm-document.

Seng-Jik avatar Seng-Jik commented on June 28, 2024

不过我觉得还是自动检测比较好

from cm-document.

ice1000 avatar ice1000 commented on June 28, 2024

我都没反对了,肯定自动检测啊。

感觉西佳佳的做法挺好的,我就参考西佳佳了

from cm-document.

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.