예제 #1
0
 // If we overload the universal reference function
 void logAndAddEfficiently(int idx)
 {
     names.emplace(nameFromIdx[idx]);
 }
예제 #2
0
 void logAndAddEfficiently(T&& name)
 {
     std::cout << name << std::endl;
     names.emplace(std::forward<T>(name));
 }
void logAndAdd(T&& name)               // name to data structure
{
  auto now = std::chrono::system_clock::now();
  log(now, "logAndAdd");
  names.emplace(std::forward<T>(name));
}
예제 #4
0
 void logAndAdd(const std::string& name)
 {
     std::cout << name << std::endl;
     names.emplace(name);
 }
예제 #5
0
void logAndAdd(T&& name)
{
	auto now = getCurrentSystemTime();
	cout << now << ": " << name << endl;
	names.emplace(std::forward<T>(name));
}