From: Orvid King Date: Mon, 27 Jul 2015 22:42:23 +0000 (-0700) Subject: Add typename qualifiers to Singleton.h X-Git-Tag: v0.53.0~52 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c23b7977ce59f1888e75770059a745b5889a96c7;p=folly.git 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 --- 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");