summaryrefslogtreecommitdiffstats
path: root/libcxx
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2013-08-30 19:12:42 +0000
committerHoward Hinnant <hhinnant@apple.com>2013-08-30 19:12:42 +0000
commit525dc284b4ee066b33ae76de5e6467d2191da442 (patch)
tree2b1cac8b09069784932be7ad89202bde7d90a6aa /libcxx
parent8b4c82f0fe1018235096f720a829c1c3cee94cc0 (diff)
downloadbcm5719-llvm-525dc284b4ee066b33ae76de5e6467d2191da442.tar.gz
bcm5719-llvm-525dc284b4ee066b33ae76de5e6467d2191da442.zip
is_destructible for function types was mistakenly returning true instead of false. This is true in both C++11 and C++1y, but has been clarified by the post C++11 LWG issue 2049.
llvm-svn: 189687
Diffstat (limited to 'libcxx')
-rw-r--r--libcxx/include/type_traits3
-rw-r--r--libcxx/test/utilities/meta/meta.unary/meta.unary.prop/is_destructible.pass.cpp3
-rw-r--r--libcxx/www/cxx1y_status.html2
3 files changed, 6 insertions, 2 deletions
diff --git a/libcxx/include/type_traits b/libcxx/include/type_traits
index 73ece1ea2fa..5e4d1550a88 100644
--- a/libcxx/include/type_traits
+++ b/libcxx/include/type_traits
@@ -1446,7 +1446,8 @@ __is_destructible_test(_Tp&);
false_type
__is_destructible_test(__any);
-template <class _Tp, bool = is_void<_Tp>::value || is_abstract<_Tp>::value>
+template <class _Tp, bool = is_void<_Tp>::value || is_abstract<_Tp>::value
+ || is_function<_Tp>::value>
struct __destructible_imp
: public common_type
<
diff --git a/libcxx/test/utilities/meta/meta.unary/meta.unary.prop/is_destructible.pass.cpp b/libcxx/test/utilities/meta/meta.unary/meta.unary.prop/is_destructible.pass.cpp
index b4432dff7cd..5cabb381db5 100644
--- a/libcxx/test/utilities/meta/meta.unary/meta.unary.prop/is_destructible.pass.cpp
+++ b/libcxx/test/utilities/meta/meta.unary/meta.unary.prop/is_destructible.pass.cpp
@@ -57,6 +57,8 @@ struct A
~A();
};
+typedef void (Function) ();
+
int main()
{
test_is_destructible<A>();
@@ -77,4 +79,5 @@ int main()
#if __has_feature(cxx_access_control_sfinae)
test_is_not_destructible<NotEmpty>();
#endif
+ test_is_not_destructible<Function>();
}
diff --git a/libcxx/www/cxx1y_status.html b/libcxx/www/cxx1y_status.html
index 6bf68e1f923..c1f61094d22 100644
--- a/libcxx/www/cxx1y_status.html
+++ b/libcxx/www/cxx1y_status.html
@@ -133,7 +133,7 @@
<tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#2005">2005</a></td><td>unordered_map::insert(T&&) protection should apply to map too</td><td>Portland</td><td></td></tr>
<tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#2011">2011</a></td><td>Unexpected output required of strings</td><td>Portland</td><td>Complete</td></tr>
<tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#2048">2048</a></td><td>Unnecessary mem_fn overloads</td><td>Portland</td><td></td></tr>
- <tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#2049">2049</a></td><td>is_destructible is underspecified</td><td>Portland</td><td></td></tr>
+ <tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#2049">2049</a></td><td>is_destructible is underspecified</td><td>Portland</td><td>Complete</td></tr>
<tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#2056">2056</a></td><td>future_errc enums start with value 0 (invalid value for broken_promise)</td><td>Portland</td><td></td></tr>
<tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#2058">2058</a></td><td>valarray and begin/end</td><td>Portland</td><td>Complete</td></tr>
<tr><td></td><td></td><td></td><td></td></tr>
OpenPOWER on IntegriCloud