Example #1
0
 // If we overload the universal reference function
 void logAndAddEfficiently(int idx)
 {
     names.emplace(nameFromIdx[idx]);
 }
Example #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));
}
Example #4
0
 void logAndAdd(const std::string& name)
 {
     std::cout << name << std::endl;
     names.emplace(name);
 }
Example #5
0
void logAndAdd(T&& name)
{
	auto now = getCurrentSystemTime();
	cout << now << ": " << name << endl;
	names.emplace(std::forward<T>(name));
}