[cpp] Added C++11 lambda snippets

This commit is contained in:
Aaron Broder 2012-08-31 14:53:39 -07:00
parent e7d5983bfc
commit a3e5bbed2b

View File

@ -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}