Fix UBSAN failure in RangeTest.cpp with libstdc++-v4.9
[folly.git] / folly / Optional.h
index 39abcc1c6db900ddc5a4118c0335dec55e115b98..60ae2c735b1152ca2c883263c483b4ca229af386 100644 (file)
 #include <type_traits>
 #include <utility>
 
-#include <folly/Launder.h>
 #include <folly/Portability.h>
 #include <folly/Traits.h>
 #include <folly/Utility.h>
+#include <folly/lang/Launder.h>
 
 namespace folly {
 
@@ -645,12 +645,12 @@ detail::OptionalAwaitable<Value>
 } // namespace folly
 
 // This makes folly::Optional<Value> useable as a coroutine return type..
-FOLLY_NAMESPACE_STD_BEGIN
+namespace std {
 namespace experimental {
 template <typename Value, typename... Args>
 struct coroutine_traits<folly::Optional<Value>, Args...> {
   using promise_type = folly::detail::OptionalPromise<Value>;
 };
 } // namespace experimental
-FOLLY_NAMESPACE_STD_END
+} // namespace std
 #endif // FOLLY_HAS_COROUTINES