Disallow folly::Singletons before main()
[folly.git] / folly / Singleton.h
index c377f3ad02c49c6b3cc2a6f233d7c80371edb15c..9c575ed7cc6d81a12e0924657684ccfeaf776c24 100644 (file)
@@ -348,7 +348,7 @@ class SingletonVault {
     }
   };
 
-  explicit SingletonVault(Type type = Type::Relaxed) : type_(type) {}
+  explicit SingletonVault(Type type = Type::Strict) : type_(type) {}
 
   // Destructor is only called by unit tests to check destroyInstances.
   ~SingletonVault();
@@ -509,7 +509,7 @@ class SingletonVault {
 
   folly::Synchronized<State> state_;
 
-  Type type_{Type::Relaxed};
+  Type type_;
 };
 
 // This is the wrapper class that most users actually interact with.