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