PrevUpHomeNext

Non-Extendible Unique-Entry Collection

The implementation file:

Book::Book(string const& title) : impl_ptr_type(nullptr)
{
   static Mutex mutex;
   static All   books;
   Lock          lock (mutex);
   auto         found = books.find(title);

   // If the title found, return it.
   // Otherwise, return an invalid book.
   if (found != books.end()) *this = found->second;
}

PrevUpHomeNext