From c23b7977ce59f1888e75770059a745b5889a96c7 Mon Sep 17 00:00:00 2001 From: Orvid King Date: Mon, 27 Jul 2015 15:42:23 -0700 Subject: [PATCH] Add typename qualifiers to Singleton.h Summary: MSVC complains if these are not there. Closes #248 Reviewed By: @yfeldblum Differential Revision: D2282845 Pulled By: @sgolemon --- folly/Singleton.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/folly/Singleton.h b/folly/Singleton.h index 84d6d41b..80c9bf2d 100644 --- a/folly/Singleton.h +++ b/folly/Singleton.h @@ -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"); -- 2.34.1