lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] (no subject)


From: Greg Chicares
Subject: [lmi-commits] (no subject)
Date: Fri, 29 Jul 2016 00:01:49 +0000 (UTC)

branch: master
commit 5fd7cd69e080ea657cd8d5a89b9e791453fc3c03
Author: Gregory W. Chicares <address@hidden>
Date:   Thu Jul 28 23:59:02 2016 +0000

    Eschew injected-class-name
    
    Class name injection was not clearly specified in C++98:
      http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#147
    although it was clarified in C++03 [14.6.1/1]. Writing out the
    <template-parameters> explicitly seems to make it more readable, to
    me at least. Furthermore, there are recent injected-class-name defects
    in several compilers, e.g.:
      https://gcc.gnu.org/bugzilla/show_bug.cgi?id=11764
      https://llvm.org/bugs/show_bug.cgi?id=8263
      https://connect.microsoft.com/VisualStudio/feedback/details/1618414
---
 cache_file_reads.hpp |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cache_file_reads.hpp b/cache_file_reads.hpp
index b079e73..8c027c5 100644
--- a/cache_file_reads.hpp
+++ b/cache_file_reads.hpp
@@ -52,9 +52,9 @@ class file_cache
     typedef std::string key_type;
 
     // Return singleton instance of the cache.
-    static file_cache& instance()
+    static file_cache<T>& instance()
         {
-        static file_cache z;
+        static file_cache<T> z;
         return z;
         }
 



reply via email to

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