mirror of git://gcc.gnu.org/git/gcc.git
functional: Formatting fixes.
2007-03-25 Paolo Carlini <pcarlini@suse.de> * include/tr1/functional: Formatting fixes. From-SVN: r123199
This commit is contained in:
parent
a5ad201780
commit
cdbd119b94
|
|
@ -1,3 +1,7 @@
|
|||
2007-03-25 Paolo Carlini <pcarlini@suse.de>
|
||||
|
||||
* include/tr1/functional: Formatting fixes.
|
||||
|
||||
2007-03-23 Paolo Carlini <pcarlini@suse.de>
|
||||
|
||||
* testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/4402.cc:
|
||||
|
|
|
|||
|
|
@ -78,8 +78,7 @@ _GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
|
|||
|
||||
template<typename _Tp>
|
||||
struct _Has_result_type
|
||||
: integral_constant<
|
||||
bool,
|
||||
: integral_constant<bool,
|
||||
_Has_result_type_helper<typename remove_cv<_Tp>::type>::value>
|
||||
{ };
|
||||
|
||||
|
|
@ -517,7 +516,9 @@ _GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
|
|||
_Tp* _M_data;
|
||||
public:
|
||||
typedef _Tp type;
|
||||
explicit reference_wrapper(_Tp& __indata): _M_data(&__indata)
|
||||
|
||||
explicit
|
||||
reference_wrapper(_Tp& __indata): _M_data(&__indata)
|
||||
{ }
|
||||
|
||||
reference_wrapper(const reference_wrapper<_Tp>& __inref):
|
||||
|
|
@ -637,16 +638,19 @@ _GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
|
|||
explicit _Mem_fn(_Functor __pmf) : __pmf(__pmf) { }
|
||||
|
||||
// Handle objects
|
||||
_Res operator()(_Class& __object, _ArgTypes... __args) const
|
||||
_Res
|
||||
operator()(_Class& __object, _ArgTypes... __args) const
|
||||
{ return (__object.*__pmf)(__args...); }
|
||||
|
||||
// Handle pointers
|
||||
_Res operator()(_Class* __object, _ArgTypes... __args) const
|
||||
_Res
|
||||
operator()(_Class* __object, _ArgTypes... __args) const
|
||||
{ return (__object->*__pmf)(__args...); }
|
||||
|
||||
// Handle smart pointers, references and pointers to derived
|
||||
template<typename _Tp>
|
||||
_Res operator()(_Tp& __object, _ArgTypes... __args) const
|
||||
_Res
|
||||
operator()(_Tp& __object, _ArgTypes... __args) const
|
||||
{ return _M_call(__object, &__object, __args...); }
|
||||
|
||||
private:
|
||||
|
|
@ -682,11 +686,13 @@ _GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
|
|||
explicit _Mem_fn(_Functor __pmf) : __pmf(__pmf) { }
|
||||
|
||||
// Handle objects
|
||||
_Res operator()(const _Class& __object, _ArgTypes... __args) const
|
||||
_Res
|
||||
operator()(const _Class& __object, _ArgTypes... __args) const
|
||||
{ return (__object.*__pmf)(__args...); }
|
||||
|
||||
// Handle pointers
|
||||
_Res operator()(const _Class* __object, _ArgTypes... __args) const
|
||||
_Res
|
||||
operator()(const _Class* __object, _ArgTypes... __args) const
|
||||
{ return (__object->*__pmf)(__args...); }
|
||||
|
||||
// Handle smart pointers, references and pointers to derived
|
||||
|
|
@ -727,16 +733,19 @@ _GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
|
|||
explicit _Mem_fn(_Functor __pmf) : __pmf(__pmf) { }
|
||||
|
||||
// Handle objects
|
||||
_Res operator()(volatile _Class& __object, _ArgTypes... __args) const
|
||||
_Res
|
||||
operator()(volatile _Class& __object, _ArgTypes... __args) const
|
||||
{ return (__object.*__pmf)(__args...); }
|
||||
|
||||
// Handle pointers
|
||||
_Res operator()(volatile _Class* __object, _ArgTypes... __args) const
|
||||
_Res
|
||||
operator()(volatile _Class* __object, _ArgTypes... __args) const
|
||||
{ return (__object->*__pmf)(__args...); }
|
||||
|
||||
// Handle smart pointers, references and pointers to derived
|
||||
template<typename _Tp>
|
||||
_Res operator()(_Tp& __object, _ArgTypes... __args) const
|
||||
_Res
|
||||
operator()(_Tp& __object, _ArgTypes... __args) const
|
||||
{ return _M_call(__object, &__object, __args...); }
|
||||
|
||||
private:
|
||||
|
|
@ -837,8 +846,7 @@ _GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
|
|||
public:
|
||||
template<typename _Tp>
|
||||
struct _Result_type
|
||||
: _Mem_fn_const_or_non<
|
||||
_Res,
|
||||
: _Mem_fn_const_or_non<_Res,
|
||||
(sizeof(__sfinae_types::__two)
|
||||
== sizeof(__check_const<_Tp>(__get_ref<_Tp>(), (_Tp*)0)))>
|
||||
{ };
|
||||
|
|
@ -854,17 +862,21 @@ _GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
|
|||
struct result<_CVMem(_Tp&)>
|
||||
: public _Result_type<_Tp> { };
|
||||
|
||||
explicit _Mem_fn(_Res _Class::*__pm) : __pm(__pm) { }
|
||||
explicit
|
||||
_Mem_fn(_Res _Class::*__pm) : __pm(__pm) { }
|
||||
|
||||
// Handle objects
|
||||
_Res& operator()(_Class& __object) const
|
||||
_Res&
|
||||
operator()(_Class& __object) const
|
||||
{ return __object.*__pm; }
|
||||
|
||||
const _Res& operator()(const _Class& __object) const
|
||||
const _Res&
|
||||
operator()(const _Class& __object) const
|
||||
{ return __object.*__pm; }
|
||||
|
||||
// Handle pointers
|
||||
_Res& operator()(_Class* __object) const
|
||||
_Res&
|
||||
operator()(_Class* __object) const
|
||||
{ return __object->*__pm; }
|
||||
|
||||
const _Res&
|
||||
|
|
@ -1105,11 +1117,12 @@ _GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
|
|||
|
||||
template<typename _CVArg, typename... _Args>
|
||||
typename result_of<_CVArg(_Args...)>::type
|
||||
operator()(_CVArg& __arg, const tuple<_Args...>& __tuple)
|
||||
const volatile
|
||||
operator()(_CVArg& __arg,
|
||||
const tuple<_Args...>& __tuple) const volatile
|
||||
{
|
||||
// Construct an index tuple and forward to __call
|
||||
typedef typename _Build_index_tuple<sizeof...(_Args)>::__type _Indexes;
|
||||
typedef typename _Build_index_tuple<sizeof...(_Args)>::__type
|
||||
_Indexes;
|
||||
return this->__call(__arg, __tuple, _Indexes());
|
||||
}
|
||||
|
||||
|
|
@ -1144,8 +1157,9 @@ _GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
|
|||
// Add a reference, if it hasn't already been done for us.
|
||||
// This allows us to be a little bit sloppy in constructing
|
||||
// the tuple that we pass to result_of<...>.
|
||||
typedef typename _Safe_tuple_element<(is_placeholder<_Arg>::value - 1),
|
||||
_Tuple>::type __base_type;
|
||||
typedef typename _Safe_tuple_element<(is_placeholder<_Arg>::value
|
||||
- 1), _Tuple>::type
|
||||
__base_type;
|
||||
|
||||
public:
|
||||
typedef typename add_reference<__base_type>::type type;
|
||||
|
|
@ -1155,7 +1169,8 @@ _GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
|
|||
typename result<_Mu(_Arg, _Tuple)>::type
|
||||
operator()(const volatile _Arg&, const _Tuple& __tuple) const volatile
|
||||
{
|
||||
return ::std::_GLIBCXX_TR1::get<(is_placeholder<_Arg>::value - 1)>(__tuple);
|
||||
return ::std::_GLIBCXX_TR1::get<(is_placeholder<_Arg>::value
|
||||
- 1)>(__tuple);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -1180,7 +1195,8 @@ _GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
|
|||
|
||||
// Pick up the cv-qualifiers of the argument
|
||||
template<typename _CVArg, typename _Tuple>
|
||||
_CVArg& operator()(_CVArg& __arg, const _Tuple&) const volatile
|
||||
_CVArg&
|
||||
operator()(_CVArg& __arg, const _Tuple&) const volatile
|
||||
{ return __arg; }
|
||||
};
|
||||
|
||||
|
|
@ -1195,7 +1211,10 @@ _GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
|
|||
struct _Maybe_wrap_member_pointer
|
||||
{
|
||||
typedef _Tp type;
|
||||
static const _Tp& __do_wrap(const _Tp& __x) { return __x; }
|
||||
|
||||
static const _Tp&
|
||||
__do_wrap(const _Tp& __x)
|
||||
{ return __x; }
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -1209,7 +1228,10 @@ _GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
|
|||
struct _Maybe_wrap_member_pointer<_Tp _Class::*>
|
||||
{
|
||||
typedef _Mem_fn<_Tp _Class::*> type;
|
||||
static type __do_wrap(_Tp _Class::* __pm) { return type(__pm); }
|
||||
|
||||
static type
|
||||
__do_wrap(_Tp _Class::* __pm)
|
||||
{ return type(__pm); }
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -1393,7 +1415,8 @@ _GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
|
|||
public:
|
||||
typedef _Result result_type;
|
||||
|
||||
explicit _Bind_result(_Functor __f, _Bound_args... __bound_args)
|
||||
explicit
|
||||
_Bind_result(_Functor __f, _Bound_args... __bound_args)
|
||||
: _M_f(__f), _M_bound_args(__bound_args...) { }
|
||||
|
||||
// Call unqualified
|
||||
|
|
@ -1412,7 +1435,6 @@ _GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
|
|||
return this->__call(_GLIBCXX_TR1::tie(__args...), _Bound_indexes());
|
||||
}
|
||||
|
||||
|
||||
// Call as volatile
|
||||
template<typename... _Args>
|
||||
result_type
|
||||
|
|
@ -1421,7 +1443,6 @@ _GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
|
|||
return this->__call(_GLIBCXX_TR1::tie(__args...), _Bound_indexes());
|
||||
}
|
||||
|
||||
|
||||
// Call as const volatile
|
||||
template<typename... _Args>
|
||||
result_type
|
||||
|
|
@ -1523,14 +1544,19 @@ _GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
|
|||
void (_Undefined_class::*_M_member_pointer)();
|
||||
};
|
||||
|
||||
union _Any_data {
|
||||
union _Any_data
|
||||
{
|
||||
void* _M_access() { return &_M_pod_data[0]; }
|
||||
const void* _M_access() const { return &_M_pod_data[0]; }
|
||||
|
||||
template<typename _Tp> _Tp& _M_access()
|
||||
template<typename _Tp>
|
||||
_Tp&
|
||||
_M_access()
|
||||
{ return *static_cast<_Tp*>(_M_access()); }
|
||||
|
||||
template<typename _Tp> const _Tp& _M_access() const
|
||||
template<typename _Tp>
|
||||
const _Tp&
|
||||
_M_access() const
|
||||
{ return *static_cast<const _Tp*>(_M_access()); }
|
||||
|
||||
_Nocopy_types _M_unused;
|
||||
|
|
@ -1599,10 +1625,12 @@ _GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
|
|||
&& sizeof(_Functor) <= _M_max_size
|
||||
&& __alignof__(_Functor) <= _M_max_align
|
||||
&& (_M_max_align % __alignof__(_Functor) == 0));
|
||||
|
||||
typedef integral_constant<bool, __stored_locally> _Local_storage;
|
||||
|
||||
// Retrieve a pointer to the function object
|
||||
static _Functor* _M_get_pointer(const _Any_data& __source)
|
||||
static _Functor*
|
||||
_M_get_pointer(const _Any_data& __source)
|
||||
{
|
||||
const _Functor* __ptr =
|
||||
__stored_locally? &__source._M_access<_Functor>()
|
||||
|
|
@ -1647,7 +1675,8 @@ _GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
|
|||
_M_manager(_Any_data& __dest, const _Any_data& __source,
|
||||
_Manager_operation __op)
|
||||
{
|
||||
switch (__op) {
|
||||
switch (__op)
|
||||
{
|
||||
case __get_type_info:
|
||||
__dest._M_access<const type_info*>() = &typeid(_Functor);
|
||||
break;
|
||||
|
|
@ -1725,7 +1754,8 @@ _GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
|
|||
_M_manager(_Any_data& __dest, const _Any_data& __source,
|
||||
_Manager_operation __op)
|
||||
{
|
||||
switch (__op) {
|
||||
switch (__op)
|
||||
{
|
||||
case __get_type_info:
|
||||
__dest._M_access<const type_info*>() = &typeid(_Functor);
|
||||
break;
|
||||
|
|
@ -1754,10 +1784,8 @@ _GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
|
|||
~_Function_base()
|
||||
{
|
||||
if (_M_manager)
|
||||
{
|
||||
_M_manager(_M_functor, _M_functor, __destroy_functor);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool _M_empty() const { return !_M_manager; }
|
||||
|
|
@ -1779,7 +1807,8 @@ _GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
|
|||
typedef _Function_base::_Base_manager<_Functor> _Base;
|
||||
|
||||
public:
|
||||
static _Res _M_invoke(const _Any_data& __functor, _ArgTypes... __args)
|
||||
static _Res
|
||||
_M_invoke(const _Any_data& __functor, _ArgTypes... __args)
|
||||
{
|
||||
return (*_Base::_M_get_pointer(__functor))(__args...);
|
||||
}
|
||||
|
|
@ -1792,7 +1821,8 @@ _GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
|
|||
typedef _Function_base::_Base_manager<_Functor> _Base;
|
||||
|
||||
public:
|
||||
static void _M_invoke(const _Any_data& __functor, _ArgTypes... __args)
|
||||
static void
|
||||
_M_invoke(const _Any_data& __functor, _ArgTypes... __args)
|
||||
{
|
||||
(*_Base::_M_get_pointer(__functor))(__args...);
|
||||
}
|
||||
|
|
@ -1805,7 +1835,8 @@ _GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
|
|||
typedef _Function_base::_Ref_manager<_Functor> _Base;
|
||||
|
||||
public:
|
||||
static _Res _M_invoke(const _Any_data& __functor, _ArgTypes... __args)
|
||||
static _Res
|
||||
_M_invoke(const _Any_data& __functor, _ArgTypes... __args)
|
||||
{
|
||||
return
|
||||
__callable_functor(**_Base::_M_get_pointer(__functor))(__args...);
|
||||
|
|
@ -1819,7 +1850,8 @@ _GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
|
|||
typedef _Function_base::_Ref_manager<_Functor> _Base;
|
||||
|
||||
public:
|
||||
static void _M_invoke(const _Any_data& __functor, _ArgTypes... __args)
|
||||
static void
|
||||
_M_invoke(const _Any_data& __functor, _ArgTypes... __args)
|
||||
{
|
||||
__callable_functor(**_Base::_M_get_pointer(__functor))(__args...);
|
||||
}
|
||||
|
|
@ -1834,9 +1866,11 @@ _GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
|
|||
_Base;
|
||||
|
||||
public:
|
||||
static _Res _M_invoke(const _Any_data& __functor, _ArgTypes... __args)
|
||||
static _Res
|
||||
_M_invoke(const _Any_data& __functor, _ArgTypes... __args)
|
||||
{
|
||||
return _GLIBCXX_TR1::mem_fn(_Base::_M_get_pointer(__functor)->__value)(__args...);
|
||||
return _GLIBCXX_TR1::
|
||||
mem_fn(_Base::_M_get_pointer(__functor)->__value)(__args...);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -1854,7 +1888,8 @@ _GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
|
|||
_M_manager(_Any_data& __dest, const _Any_data& __source,
|
||||
_Manager_operation __op)
|
||||
{
|
||||
switch (__op) {
|
||||
switch (__op)
|
||||
{
|
||||
case __get_type_info:
|
||||
__dest._M_access<const type_info*>() = &typeid(_Functor);
|
||||
break;
|
||||
|
|
@ -1870,9 +1905,11 @@ _GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
|
|||
return false;
|
||||
}
|
||||
|
||||
static void _M_invoke(const _Any_data& __functor, _ArgTypes... __args)
|
||||
static void
|
||||
_M_invoke(const _Any_data& __functor, _ArgTypes... __args)
|
||||
{
|
||||
_GLIBCXX_TR1::mem_fn(_Base::_M_get_pointer(__functor)->__value)(__args...);
|
||||
_GLIBCXX_TR1::
|
||||
mem_fn(_Base::_M_get_pointer(__functor)->__value)(__args...);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -1963,7 +2000,8 @@ _GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
|
|||
* If @a x targets a function pointer or a reference to a function
|
||||
* object, then this operation will not throw an exception.
|
||||
*/
|
||||
function& operator=(const function& __x)
|
||||
function&
|
||||
operator=(const function& __x)
|
||||
{
|
||||
function(__x).swap(*this);
|
||||
return *this;
|
||||
|
|
@ -1976,9 +2014,11 @@ _GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
|
|||
*
|
||||
* The target of @a *this is deallocated, leaving it empty.
|
||||
*/
|
||||
function& operator=(_M_clear_type*)
|
||||
function&
|
||||
operator=(_M_clear_type*)
|
||||
{
|
||||
if (_M_manager)
|
||||
{
|
||||
if (_M_manager) {
|
||||
_M_manager(_M_functor, _M_functor, __destroy_functor);
|
||||
_M_manager = 0;
|
||||
_M_invoker = 0;
|
||||
|
|
@ -2046,14 +2086,10 @@ _GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
|
|||
operator _Safe_bool() const
|
||||
{
|
||||
if (_M_empty())
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
return &_Hidden_type::_M_bool;
|
||||
}
|
||||
}
|
||||
|
||||
// [3.7.2.4] function invocation
|
||||
|
||||
|
|
@ -2107,10 +2143,12 @@ _GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
|
|||
};
|
||||
|
||||
template<typename _Res, typename... _ArgTypes>
|
||||
function<_Res(_ArgTypes...)>::function(const function& __x)
|
||||
function<_Res(_ArgTypes...)>::
|
||||
function(const function& __x)
|
||||
: _Function_base()
|
||||
{
|
||||
if (__x) {
|
||||
if (__x)
|
||||
{
|
||||
_M_invoker = __x._M_invoker;
|
||||
_M_manager = __x._M_manager;
|
||||
__x._M_manager(_M_functor, __x._M_functor, __clone_functor);
|
||||
|
|
@ -2119,14 +2157,16 @@ _GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
|
|||
|
||||
template<typename _Res, typename... _ArgTypes>
|
||||
template<typename _Functor>
|
||||
function<_Res(_ArgTypes...)>
|
||||
::function(_Functor __f,
|
||||
function<_Res(_ArgTypes...)>::
|
||||
function(_Functor __f,
|
||||
typename __gnu_cxx::__enable_if<
|
||||
!is_integral<_Functor>::value, _Useless>::__type)
|
||||
: _Function_base()
|
||||
{
|
||||
typedef _Function_handler<_Signature_type, _Functor> _My_handler;
|
||||
if (_My_handler::_M_not_empty_function(__f)) {
|
||||
|
||||
if (_My_handler::_M_not_empty_function(__f))
|
||||
{
|
||||
_M_invoker = &_My_handler::_M_invoke;
|
||||
_M_manager = &_My_handler::_M_manager;
|
||||
_My_handler::_M_init_functor(_M_functor, __f);
|
||||
|
|
@ -2134,7 +2174,9 @@ _GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
|
|||
}
|
||||
|
||||
template<typename _Res, typename... _ArgTypes>
|
||||
_Res function<_Res(_ArgTypes...)>::operator()(_ArgTypes... __args) const
|
||||
_Res
|
||||
function<_Res(_ArgTypes...)>::
|
||||
operator()(_ArgTypes... __args) const
|
||||
{
|
||||
if (_M_empty())
|
||||
{
|
||||
|
|
@ -2148,7 +2190,9 @@ _GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
|
|||
}
|
||||
|
||||
template<typename _Res, typename... _ArgTypes>
|
||||
const type_info& function<_Res(_ArgTypes...)>::target_type() const
|
||||
const type_info&
|
||||
function<_Res(_ArgTypes...)>::
|
||||
target_type() const
|
||||
{
|
||||
if (_M_manager)
|
||||
{
|
||||
|
|
@ -2157,14 +2201,14 @@ _GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
|
|||
return *__typeinfo_result._M_access<const type_info*>();
|
||||
}
|
||||
else
|
||||
{
|
||||
return typeid(void);
|
||||
}
|
||||
}
|
||||
|
||||
template<typename _Res, typename... _ArgTypes>
|
||||
template<typename _Functor>
|
||||
_Functor* function<_Res(_ArgTypes...)>::target()
|
||||
_Functor*
|
||||
function<_Res(_ArgTypes...)>::
|
||||
target()
|
||||
{
|
||||
if (typeid(_Functor) == target_type() && _M_manager)
|
||||
{
|
||||
|
|
@ -2176,14 +2220,14 @@ _GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
|
|||
return __ptr._M_access<_Functor*>();
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
template<typename _Res, typename... _ArgTypes>
|
||||
template<typename _Functor>
|
||||
const _Functor* function<_Res(_ArgTypes...)>::target() const
|
||||
const _Functor*
|
||||
function<_Res(_ArgTypes...)>::
|
||||
target() const
|
||||
{
|
||||
if (typeid(_Functor) == target_type() && _M_manager)
|
||||
{
|
||||
|
|
@ -2192,10 +2236,8 @@ _GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
|
|||
return __ptr._M_access<const _Functor*>();
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
// [3.7.2.7] null pointer comparisons
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue