POV-Ray : Newsgroups : povray.off-topic : Standard libraries : Re: Standard libraries Server Time
6 Sep 2024 13:21:37 EDT (-0400)
  Re: Standard libraries  
From: Warp
Date: 6 Mar 2009 20:05:44
Message: <49b1c868@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:
> What's the type of
>     [&](int x) { total += x; }

> What kind of variable can I assign that to?

  You don't have to know the type (and in fact, the type is unspecified).
You create a variable like this:

auto myLambdaFunc = [&](int x) { total += x; };

-- 
                                                          - Warp


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.