Template prefix for emplace method

Viewed 40

When i'm trying to use emplace method of unordered_map my IDE (CLion 2021.1.2 Build #CL-211.7442.42) inserts a template keyword before emplace method. I don't get it why it is used in my case? Example:

template<typename T>
class Store {
public:
  void Set(std::string const& key, T value) {
    storage_.template emplace(key, std::move(value));
  }
private:
  std::unordered_map<std::string, T> storage_;
};
0 Answers
Related