0%

gcc

content

RVO(Return Value Optimization)

NRVO(Named Return Value Optimization)

code snipts

1
2
3
4
5
6
7
8
9
#include <algorithm>
#include <cctype>

std::string lower(const std::string &data) {
std::string result = data;
std::transform(result.begin(), result.end(), result.begin(),
[](unsigned char c){ return std::tolower(c); });
return result;
}