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.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@189687 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Howard Hinnant 2013-08-30 19:12:42 +00:00
parent cb0e6b65a8
commit d179407288
3 changed files with 6 additions and 2 deletions

View File

@ -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
<

View File

@ -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>();
}

View File

@ -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>