From 89c3444643628af30c8d1c680d0ea01a95bb0bc4 Mon Sep 17 00:00:00 2001 From: Tom Honermann Date: Sun, 17 Jan 2016 21:19:49 -0500 Subject: [PATCH] Revert Origin's Destructible concept to use std::is_destructible. Commit 2aa10564fc09c9d27e4ea64249655dbf17801c92 changed Origin's definition of the Destructible concept in terms of the validity or a pseudo destructor expression rather than std::is_destructible. That change resulted in reference and array of known bound types failing to model the Destructible concept as required by C++14 via the resolution of DR 2049 [1]. This regression is tracked at [2]. This change reverts the change made to the Destructible concept in that commit. [1]: http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#2049 [2]: https://github.com/asutton/origin/issues/5 --- origin/core/concepts.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/origin/core/concepts.hpp b/origin/core/concepts.hpp index 6769db3..5c495ee 100644 --- a/origin/core/concepts.hpp +++ b/origin/core/concepts.hpp @@ -198,8 +198,7 @@ template concept bool Destructible() { - // return std::is_destructible::value; - return requires (T* t) { t->~T(); }; + return std::is_destructible::value; } // Is true if and only if an object of type T can be constructed with