Add typename qualifiers to Singleton.h
[folly.git] / folly / Singleton.h
index 84d6d41bf5a543c6bc82ac7a67e6fe25fe401ab1..80c9bf2dcab7a6932bb4f3de4b121d053012b885 100644 (file)
@@ -453,12 +453,12 @@ class Singleton {
   T* operator->() { return get(); }
 
   explicit Singleton(std::nullptr_t _ = nullptr,
-                     Singleton::TeardownFunc t = nullptr) :
+                     typename Singleton::TeardownFunc t = nullptr) :
       Singleton ([]() { return new T; }, std::move(t)) {
   }
 
-  explicit Singleton(Singleton::CreateFunc c,
-                     Singleton::TeardownFunc t = nullptr) {
+  explicit Singleton(typename Singleton::CreateFunc c,
+                     typename Singleton::TeardownFunc t = nullptr) {
     if (c == nullptr) {
       throw std::logic_error(
         "nullptr_t should be passed if you want T to be default constructed");