[cpp] Added C++11 lambda snippets
This commit is contained in:
parent
e7d5983bfc
commit
a3e5bbed2b
@ -129,4 +129,13 @@ snippet itera
|
|||||||
for (auto ${1:i} = $1.begin(); $1 != $1.end(); ++$1) {
|
for (auto ${1:i} = $1.begin(); $1 != $1.end(); ++$1) {
|
||||||
${2:std::cout << *$1 << std::endl;}
|
${2:std::cout << *$1 << std::endl;}
|
||||||
}${3}
|
}${3}
|
||||||
|
##
|
||||||
|
## Lambdas
|
||||||
|
# lamda (one line)
|
||||||
|
snippet ld
|
||||||
|
[${1}](${2}){${3:/* code */}}${4}
|
||||||
|
# lambda (multi-line)
|
||||||
|
snippet lld
|
||||||
|
[${1}](${2}){
|
||||||
|
${3:/* code */}
|
||||||
|
}${4}
|
||||||
|
Loading…
Reference in New Issue
Block a user