Get MSVC able to construct an Indestructible
authorChristopher Dykes <cdykes@fb.com>
Tue, 26 Jul 2016 22:52:25 +0000 (15:52 -0700)
committerFacebook Github Bot 5 <facebook-github-bot-5-bot@fb.com>
Tue, 26 Jul 2016 22:53:46 +0000 (15:53 -0700)
Summary: It didn't like using `decltype(args)`, which wasn't really necessary as we already have it's type.

Reviewed By: yfeldblum

Differential Revision: D3623424

fbshipit-source-id: 994c23cbf486d427c6dd0fe4c6f768e51ea15ad1

folly/Indestructible.h

index 39c8f151d1201428f9e2ecb8388c4d6ce8c204bf..15e03c9d020257688d868b44a89913926821901f 100644 (file)
@@ -62,7 +62,7 @@ class Indestructible final {
  public:
   template <typename... Args>
   explicit constexpr Indestructible(Args&&... args) noexcept(
-      std::is_nothrow_constructible<T, decltype(args)...>::value)
+      std::is_nothrow_constructible<T, Args&&...>::value)
       : storage_(std::forward<Args>(args)...), inited_(true) {}
 
   ~Indestructible() = default;