Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace std::unary_function<> with std::function<> #2097

Merged
merged 3 commits into from
Aug 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ACE/ace/Auto_Ptr.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class ACE_Auto_Basic_Ptr
ACE_END_VERSIONED_NAMESPACE_DECL

#if !defined (ACE_LACKS_AUTO_PTR)
#include <memory>
# include <memory>
using std::auto_ptr;
#else /* !ACE_LACKS_AUTO_PTR */

Expand Down
2 changes: 1 addition & 1 deletion ACE/tests/Reactor_Remove_Resume_Test_Dev_Poll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ dev_poll_reactor_factory ()
*
* Reactor test execution functor.
*/
struct Run_Test : public std::unary_function<reactor_factory_type, void>
struct Run_Test : public std::function<void(reactor_factory_type)>
{
/// Function call operator overload.
void operator() (reactor_factory_type factory)
Expand Down
2 changes: 2 additions & 0 deletions TAO/orbsvcs/orbsvcs/Event/ECG_CDR_Message_Receiver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
#include "ace/ACE.h"
#include "ace/OS_NS_string.h"

#include <memory>

#if !defined(__ACE_INLINE__)
#include "orbsvcs/Event/ECG_CDR_Message_Receiver.inl"
#endif /* __ACE_INLINE__ */
Expand Down
7 changes: 4 additions & 3 deletions TAO/orbsvcs/orbsvcs/Notify/Refcountable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include <map>
#include <string>
#include <memory>
#include <typeinfo.h>

TAO_BEGIN_VERSIONED_NAMESPACE_DECL
Expand Down Expand Up @@ -44,8 +45,8 @@ class TAO_Notify_Tracker
TAO_Notify_Tracker();
~TAO_Notify_Tracker();

friend class std::auto_ptr< TAO_Notify_Tracker >;
static std::auto_ptr< TAO_Notify_Tracker > s_instance;
friend class std::unique_ptr< TAO_Notify_Tracker >;
static std::unique_ptr< TAO_Notify_Tracker > s_instance;
mutable TAO_SYNCH_MUTEX lock_;
typedef std::map<int, Entry> EntityMap;
EntityMap map_;
Expand Down Expand Up @@ -133,7 +134,7 @@ TAO_Notify_Refcountable::_decr_refcnt ()

#if (TAO_NOTIFY_REFCOUNT_DIAGNOSTICS != 0)

std::auto_ptr< TAO_Notify_Tracker > TAO_Notify_Tracker::s_instance;
std::unique_ptr< TAO_Notify_Tracker > TAO_Notify_Tracker::s_instance;

TAO_Notify_Tracker::TAO_Notify_Tracker()
: id_counter_(0)
Expand Down
2 changes: 1 addition & 1 deletion TAO/tests/Any/Recursive/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ directly_recursive_valuetype_typecodefactory_test (CORBA::ORB_ptr /* orb */,
* Test method invocation functor.
*/
template <typename T>
struct Caller : public std::unary_function<T, void>
struct Caller : public std::function<void(T)>
{
/// Constructor.
Caller (CORBA::ORB_ptr o, Test::Hello_ptr h)
Expand Down
2 changes: 1 addition & 1 deletion TAO/tests/Bug_2804_Regression/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ recursive_union_test (CORBA::ORB_ptr /* orb */,
* Test method invocation functor.
*/
template <typename T>
struct Caller : public std::unary_function<T, void>
struct Caller : public std::function<void(T)>
{
/// Constructor.
Caller (CORBA::ORB_ptr o, Test::Hello_ptr h)
Expand Down
2 changes: 1 addition & 1 deletion TAO/tests/Bug_2844_Regression/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ nested_recursive_struct_test (CORBA::ORB_ptr /* orb */,
* Test method invocation functor.
*/
template <typename T>
struct Caller : public std::unary_function<T, void>
struct Caller : public std::function<void(T)>
{
/// Constructor.
Caller (CORBA::ORB_ptr o, Test::Hello_ptr h)
Expand Down
2 changes: 1 addition & 1 deletion TAO/tests/Bug_2918_Regression/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ repeated_struct_test (CORBA::ORB_ptr /* orb */,
* Test method invocation functor.
*/
template <typename T>
struct Caller : public std::unary_function<T, void>
struct Caller : public std::function<void(T)>
{
/// Constructor.
Caller (CORBA::ORB_ptr o, Test::Hello_ptr h)
Expand Down
2 changes: 1 addition & 1 deletion TAO/tests/Bug_3919_Regression/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ nested_recursive_typecode_test (CORBA::ORB_ptr /* orb */,
* Test method invocation functor.
*/
template <typename T>
struct Caller : public std::unary_function<T, void>
struct Caller : public std::function<void(T)>
{
/// Constructor.
Caller (CORBA::ORB_ptr o, Test::Hello_ptr h)
Expand Down
Loading