Commit 82b12c4b by François Dumont

functional (_Derives_from_unary_function): Remove.

2013-04-04  François Dumont  <fdumont@gcc.gnu.org>

	* include/std/functional (_Derives_from_unary_function): Remove.
	(_Derives_from_binary_function): Remove.
	* include/std/type_traits (__sfinae_types): Remove.
	(__is_assignable_helper): Adapt.
	(__is_convertible_helper): Adapt.
	(_GLIBCXX_HAS_NESTED_TYPE): Adapt.
	Remove several explicit instantiations of integral_constant.
	* testsuite/20_util/reference_wrapper/typedefs-3.cc: Adapt.
	* testsuite/20_util/make_signed/requirements/typedefs_neg.cc:
	Adapt dg-error line number.
	* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
	Likewise.
	* testsuite/20_util/declval/requirements/1_neg.cc: Likewise.
	* testsuite/20_util/bind/ref_neg.cc: Likewise.

From-SVN: r197551
parent 7c42966e
2013-04-07 François Dumont <fdumont@gcc.gnu.org>
* include/std/functional (_Derives_from_unary_function): Remove.
(_Derives_from_binary_function): Remove.
* include/std/type_traits (__sfinae_types): Remove.
(__is_assignable_helper): Adapt.
(__is_convertible_helper): Adapt.
(_GLIBCXX_HAS_NESTED_TYPE): Adapt.
Remove several explicit instantiations of integral_constant.
* testsuite/20_util/reference_wrapper/typedefs-3.cc: Adapt.
* testsuite/20_util/make_signed/requirements/typedefs_neg.cc:
Adapt dg-error line number.
* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
Likewise.
* testsuite/20_util/declval/requirements/1_neg.cc: Likewise.
* testsuite/20_util/bind/ref_neg.cc: Likewise.
2013-04-05 Jonathan Wakely <jwakely.gcc@gmail.com>
PR libstdc++/56841
......
......@@ -185,38 +185,6 @@ _GLIBCXX_HAS_NESTED_TYPE(result_type)
: _Weak_result_type_impl<typename remove_cv<_Functor>::type>
{ };
/// Determines if the type _Tp derives from unary_function.
template<typename _Tp>
struct _Derives_from_unary_function : __sfinae_types
{
private:
template<typename _T1, typename _Res>
static __one __test(const volatile unary_function<_T1, _Res>*);
// It's tempting to change "..." to const volatile void*, but
// that fails when _Tp is a function type.
static __two __test(...);
public:
static const bool value = sizeof(__test((_Tp*)0)) == 1;
};
/// Determines if the type _Tp derives from binary_function.
template<typename _Tp>
struct _Derives_from_binary_function : __sfinae_types
{
private:
template<typename _T1, typename _T2, typename _Res>
static __one __test(const volatile binary_function<_T1, _T2, _Res>*);
// It's tempting to change "..." to const volatile void*, but
// that fails when _Tp is a function type.
static __two __test(...);
public:
static const bool value = sizeof(__test((_Tp*)0)) == 1;
};
/**
* Invoke a function object, which may be either a member pointer or a
* function object. The first parameter will tell which.
......
......@@ -30,10 +30,10 @@ void test01()
{
const int dummy = 0;
std::bind(&inc, _1)(0); // { dg-error "no match" }
// { dg-error "rvalue|const" "" { target *-*-* } 1347 }
// { dg-error "rvalue|const" "" { target *-*-* } 1361 }
// { dg-error "rvalue|const" "" { target *-*-* } 1375 }
// { dg-error "rvalue|const" "" { target *-*-* } 1389 }
// { dg-error "rvalue|const" "" { target *-*-* } 1315 }
// { dg-error "rvalue|const" "" { target *-*-* } 1329 }
// { dg-error "rvalue|const" "" { target *-*-* } 1343 }
// { dg-error "rvalue|const" "" { target *-*-* } 1357 }
std::bind(&inc, std::ref(dummy))(); // { dg-error "no match" }
}
......
......@@ -19,7 +19,7 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// { dg-error "static assertion failed" "" { target *-*-* } 1871 }
// { dg-error "static assertion failed" "" { target *-*-* } 1857 }
#include <utility>
......
......@@ -48,5 +48,5 @@ void test01()
// { dg-error "required from here" "" { target *-*-* } 40 }
// { dg-error "required from here" "" { target *-*-* } 42 }
// { dg-error "invalid use of incomplete type" "" { target *-*-* } 1613 }
// { dg-error "declaration of" "" { target *-*-* } 1577 }
// { dg-error "invalid use of incomplete type" "" { target *-*-* } 1599 }
// { dg-error "declaration of" "" { target *-*-* } 1563 }
......@@ -48,5 +48,5 @@ void test01()
// { dg-error "required from here" "" { target *-*-* } 40 }
// { dg-error "required from here" "" { target *-*-* } 42 }
// { dg-error "invalid use of incomplete type" "" { target *-*-* } 1531 }
// { dg-error "declaration of" "" { target *-*-* } 1495 }
// { dg-error "invalid use of incomplete type" "" { target *-*-* } 1517 }
// { dg-error "declaration of" "" { target *-*-* } 1481 }
......@@ -44,7 +44,8 @@ struct S12 : S1, S2 { };
struct S012 : S0, S1, S2 { };
using std::__sfinae_types;
using std::true_type;
using std::false_type;
using std::integral_constant;
using std::remove_cv;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment