[Cs3] capture block varieties

Mikhail Nesterenko mikhail at cs.kent.edu
Wed Feb 22 10:33:30 EST 2023


CS3 students,

Folks were asking me whether there is const or pointer type variants
in capture blocks of lambda functions. Not explicitly.

There are two major cases: capture by-reference and capture by-copy
(by value)). There is a way to "simulate" pass by const reference
described below.

    https://en.cppreference.com/w/cpp/language/lambda

in section: "Lambda capture"


Thanks,
-- 
Mikhail


More information about the cs3 mailing list