lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 780fb8b 04/10: Deduce pair type rather than s


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 780fb8b 04/10: Deduce pair type rather than specify it
Date: Tue, 2 Aug 2016 12:35:19 +0000 (UTC)

branch: master
commit 780fb8b9bfdc2f96c7ce171c2e3ca56d31fef4d7
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Deduce pair type rather than specify it
---
 cache_file_reads.hpp |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/cache_file_reads.hpp b/cache_file_reads.hpp
index ac9696e..9c72bd9 100644
--- a/cache_file_reads.hpp
+++ b/cache_file_reads.hpp
@@ -32,6 +32,7 @@
 #include <ctime>                        // std::time_t
 #include <map>
 #include <string>
+#include <utility>                      // std::make_pair()
 
 /// Cache of class T instances constructed from files.
 ///
@@ -84,7 +85,7 @@ class file_cache
         // insert() doesn't update the value if the key is already
         // present, so insert a dummy value and then modify it--this
         // works for both existing and new keys.
-        i = cache_.insert(i, typename map_type::value_type(filename, 
record()));
+        i = cache_.insert(i, std::make_pair(filename, record()));
         record& rec = i->second;
         rec.data = value;
         rec.write_time = write_time;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]