由于C++ 14(N3657)成员函数模板find,count,lower_bound,upper_bound,和equal_range关联的容器支持异构比较查找但at并operator[]没有那些等效的成员函数的模板.为什么会这样 ?
示例:
std::map<std::string, int, std::less<>> m;
// ...
auto it = m.find("foo"); // does not construct an std::string
auto& v = m.at("foo"); // construct an std::string
Run Code Online (Sandbox Code Playgroud) 变量函数是否已被弃用,因为C++ 11具有可变参数模板函数?更具体地说,变量函数在特定情况下有任何优势吗?我知道variadic-macro可以有它们的用途.可变函数怎么样?