Skip to content

Commit

Permalink
Merge branch 'master' into jwi-xsccleanup2
Browse files Browse the repository at this point in the history
  • Loading branch information
jwillemsen committed Nov 17, 2020
2 parents e1516a1 + b1d4854 commit 194911f
Show file tree
Hide file tree
Showing 74 changed files with 45 additions and 687 deletions.
4 changes: 0 additions & 4 deletions ACE/ACEXML/examples/SAXPrint/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
ACEXML_SAXPrint_Handler (name),
-1);

#if defined (ACE_HAS_CPP11)
std::unique_ptr<ACEXML_DefaultHandler> cleanup_handler (handler);
#else
auto_ptr<ACEXML_DefaultHandler> cleanup_handler (handler);
#endif

ACEXML_Parser parser;
ACEXML_InputSource input (stm);
Expand Down
2 changes: 0 additions & 2 deletions ACE/ace/ARGV.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,9 @@ class ACE_ARGV_Queue_Entry_T
*/
ACE_ARGV_Queue_Entry_T (const ACE_ARGV_Queue_Entry_T<CHAR_TYPE> &entry);

#if defined (ACE_HAS_CPP11)
ACE_ARGV_Queue_Entry_T (ACE_ARGV_Queue_Entry_T&&) = default;
ACE_ARGV_Queue_Entry_T &operator = (const ACE_ARGV_Queue_Entry_T &) = default;
ACE_ARGV_Queue_Entry_T &operator = (ACE_ARGV_Queue_Entry_T &&) = default;
#endif /* ACE_HAS_CPP11 */

/// We need this destructor to keep some compilers from complaining.
/// It's just a no-op, however.
Expand Down
18 changes: 8 additions & 10 deletions ACE/ace/Basic_Types.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,14 @@
# include <inttypes.h>
# endif

# if defined (ACE_HAS_CPP11)
# define ACE_HAS_INT8_T
# define ACE_HAS_UINT8_T
# define ACE_HAS_INT16_T
# define ACE_HAS_UINT16_T
# define ACE_HAS_INT32_T
# define ACE_HAS_UINT32_T
# define ACE_HAS_INT64_T
# define ACE_HAS_UINT64_T
# endif /* ACE_HAS_CPP11 */
# define ACE_HAS_INT8_T
# define ACE_HAS_UINT8_T
# define ACE_HAS_INT16_T
# define ACE_HAS_UINT16_T
# define ACE_HAS_INT32_T
# define ACE_HAS_UINT32_T
# define ACE_HAS_INT64_T
# define ACE_HAS_UINT64_T

#ifdef ACE_LACKS_INTPTR_T
# include "ace/If_Then_Else.h"
Expand Down
17 changes: 0 additions & 17 deletions ACE/ace/Bound_Ptr.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

#if !defined (ACE_HAS_CPP11)
# include "ace/Auto_Ptr.h"
#endif /* !ACE_HAS_CPP11 */

ACE_BEGIN_VERSIONED_NAMESPACE_DECL

/**
Expand Down Expand Up @@ -114,12 +110,6 @@ class ACE_Strong_Bound_Ptr
/// object \<p\> immediately.
explicit ACE_Strong_Bound_Ptr (X *p = 0);

#if !defined (ACE_HAS_CPP11)
/// Constructor that initializes an ACE_Strong_Bound_Ptr by stealing
/// ownership of an object from an auto_ptr.
explicit ACE_Strong_Bound_Ptr (auto_ptr<X> p);
#endif /* !ACE_HAS_CPP11 */

/// Copy constructor binds @c this and @a r to the same object.
ACE_Strong_Bound_Ptr (const ACE_Strong_Bound_Ptr<X, ACE_LOCK> &r);

Expand Down Expand Up @@ -216,13 +206,6 @@ class ACE_Strong_Bound_Ptr
/// underlying object.
void reset (X *p = 0);

#if !defined (ACE_HAS_CPP11)
/// Resets the ACE_Strong_Bound_Ptr to refer to a different
/// underlying object, ownership of which is stolen from the
/// auto_ptr.
void reset (auto_ptr<X> p);
#endif /* !ACE_HAS_CPP11 */

/// Allows us to check for NULL on all ACE_Strong_Bound_Ptr
/// objects.
bool null (void) const;
Expand Down
22 changes: 0 additions & 22 deletions ACE/ace/Bound_Ptr.inl
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,6 @@ ACE_Strong_Bound_Ptr<X, ACE_LOCK>::ACE_Strong_Bound_Ptr (X *p)
{
}

#if !defined (ACE_HAS_CPP11)
template <class X, class ACE_LOCK> inline
ACE_Strong_Bound_Ptr<X, ACE_LOCK>::ACE_Strong_Bound_Ptr (auto_ptr<X> p)
: counter_ (COUNTER::create_strong ()),
ptr_ (p.release())
{
}
#endif /* !ACE_HAS_CPP11 */

template <class X, class ACE_LOCK> inline
ACE_Strong_Bound_Ptr<X, ACE_LOCK>::ACE_Strong_Bound_Ptr (const ACE_Strong_Bound_Ptr<X, ACE_LOCK> &r)
: counter_ (r.counter_),
Expand Down Expand Up @@ -303,19 +294,6 @@ ACE_Strong_Bound_Ptr<X, ACE_LOCK>::reset (X *p)
delete old_ptr;
}

#if !defined (ACE_HAS_CPP11)
template<class X, class ACE_LOCK> inline void
ACE_Strong_Bound_Ptr<X, ACE_LOCK>::reset (auto_ptr<X> p)
{
COUNTER *old_counter = this->counter_;
X_t *old_ptr = this->ptr_;
this->counter_ = COUNTER::create_strong ();
this->ptr_ = p.release ();
if (COUNTER::detach_strong (old_counter) == 0)
delete old_ptr;
}
#endif /* !ACE_HAS_CPP11 */

template <class X, class ACE_LOCK> inline
ACE_Weak_Bound_Ptr<X, ACE_LOCK>::ACE_Weak_Bound_Ptr (X *p)
: counter_ (COUNTER::create_weak ()),
Expand Down
16 changes: 0 additions & 16 deletions ACE/ace/CDR_Stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1689,7 +1689,6 @@ ACE_InputCDR::read_wstring (ACE_CDR::WChar*& x)
ACE_CDR::Boolean
ACE_InputCDR::read_string (std::string& x)
{
#if defined (ACE_HAS_CPP11)
// @@ This is a slight violation of "Optimize for the common case",
// i.e. normally the translator will be 0, but OTOH the code is
// smaller and should be better for the cache ;-) ;-)
Expand Down Expand Up @@ -1727,20 +1726,12 @@ ACE_InputCDR::read_string (std::string& x)
this->good_bit_ = false;
x.clear ();
return false;
#else
ACE_CDR::Char *buf = 0;
ACE_CDR::Boolean const marshal_flag = this->read_string (buf);
x.assign (buf);
ACE::strdelete (buf);
return marshal_flag;
#endif
}

#if !defined(ACE_LACKS_STD_WSTRING)
ACE_CDR::Boolean
ACE_InputCDR::read_wstring (std::wstring& x)
{
#if defined (ACE_HAS_CPP11)
// @@ This is a slight violation of "Optimize for the common case",
// i.e. normally the translator will be 0, but OTOH the code is
// smaller and should be better for the cache ;-) ;-)
Expand Down Expand Up @@ -1814,13 +1805,6 @@ ACE_InputCDR::read_wstring (std::wstring& x)
this->good_bit_ = false;
x.clear ();
return false;
#else
ACE_CDR::WChar *buf = 0;
ACE_CDR::Boolean const marshal_flag = this->read_wstring (buf);
x.assign (buf);
ACE::strdelete (buf);
return marshal_flag;
#endif
}
#endif

Expand Down
8 changes: 0 additions & 8 deletions ACE/ace/Codeset_IBM1047.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ ACE_CDR::Boolean
ACE_IBM1047_ISO8859::read_string (ACE_InputCDR& in,
std::string & x)
{
#if defined (ACE_HAS_CPP11)
ACE_CDR::ULong len;

in.read_ulong (len);
Expand All @@ -150,9 +149,6 @@ ACE_IBM1047_ISO8859::read_string (ACE_InputCDR& in,

x.clear ();
return false;
#else
return this->ACE_Char_Codeset_Translator::read_string (in, x);
#endif
}

ACE_CDR::Boolean
Expand Down Expand Up @@ -276,7 +272,6 @@ ACE_CDR::Boolean
ACE_ISO8859_IBM1047::read_string (ACE_InputCDR& in,
std::string & x)
{
#if defined (ACE_HAS_CPP11)
ACE_CDR::ULong len;

in.read_ulong (len);
Expand All @@ -303,9 +298,6 @@ ACE_ISO8859_IBM1047::read_string (ACE_InputCDR& in,

x.clear ();
return false;
#else
return this->ACE_Char_Codeset_Translator::read_string (in, x);
#endif
}

ACE_CDR::Boolean
Expand Down
2 changes: 0 additions & 2 deletions ACE/ace/Event_Handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,6 @@ ACE_Event_Handler_var::reset (ACE_Event_Handler *p)
*this = p;
}

#if defined (ACE_HAS_CPP11)
ACE_Event_Handler_var::operator bool() const
{
return this->ptr_ == nullptr ? false : true;
Expand All @@ -374,7 +373,6 @@ ACE_Event_Handler_var::operator !=(std::nullptr_t) const
return this->ptr_ == nullptr ? false : true;

}
#endif /* ACE_HAS_CPP11 */

// ---------------------------------------------------------------------

Expand Down
6 changes: 0 additions & 6 deletions ACE/ace/Event_Handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -343,22 +343,18 @@ class ACE_Export ACE_Event_Handler_var
/// Reset the handler.
void reset (ACE_Event_Handler *p = 0);

#if defined (ACE_HAS_CPP11)
/// Bool operator to check if the ACE_Event_Handler_var has a value
explicit operator bool() const;
/// Equality operator to compare with nullptr_t
bool operator ==(std::nullptr_t) const;
/// Not equal operator to compare with nullptr_t
bool operator !=(std::nullptr_t) const;
#endif

private:
/// Handler.
ACE_Event_Handler *ptr_;
};

#if defined ACE_HAS_CPP11

/// Define that we can use in user code to check if this
/// helper factory method is there
#define ACE_HAS_ACE_MAKE_EVENT_HANDLER
Expand All @@ -385,8 +381,6 @@ namespace ACE
}
}

#endif

/**
* @class ACE_Notification_Buffer
*
Expand Down
15 changes: 1 addition & 14 deletions ACE/ace/Global_Macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,24 +65,11 @@
# error ACE/TAO require C++11 compliance, please upgrade your compiler and/or fix the platform configuration for your environment
#endif /* !ACE_HAS_CPP11 */

# if defined (ACE_NEEDS_FUNC_DEFINITIONS) && !defined (ACE_HAS_CPP11)
// It just evaporated ;-) Not pleasant.
# define ACE_UNIMPLEMENTED_FUNC(f)
# else
# if defined (ACE_HAS_CPP11)
# define ACE_UNIMPLEMENTED_FUNC(f) f = delete;
# else
# define ACE_UNIMPLEMENTED_FUNC(f) f;
# endif
# endif /* ACE_NEEDS_FUNC_DEFINITIONS */
#define ACE_UNIMPLEMENTED_FUNC(f) f = delete;

// noexcept(false) specification to specify that the operation can
// throw an exception
#if defined (ACE_HAS_CPP11)
#define ACE_NOEXCEPT_FALSE noexcept(false)
#else
#define ACE_NOEXCEPT_FALSE
#endif

// ----------------------------------------------------------------

Expand Down
4 changes: 0 additions & 4 deletions ACE/ace/OS_NS_Thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3600,11 +3600,7 @@ ACE_OS::thr_create (ACE_THR_FUNC func,
else
thread_args = thread_adapter;

#if defined (ACE_HAS_CPP11)
std::unique_ptr <ACE_Base_Thread_Adapter> auto_thread_args;
#else
auto_ptr <ACE_Base_Thread_Adapter> auto_thread_args;
#endif /* ACE_HAS_CPP11 */

if (thread_adapter == 0)
ACE_auto_ptr_reset (auto_thread_args,
Expand Down
4 changes: 0 additions & 4 deletions ACE/ace/Proactor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,11 +243,7 @@ ACE_Proactor_Handle_Timeout_Upcall::timeout (ACE_Proactor_Timer_Queue &,
ACE_TEXT ("create_asynch_timer failed")),
-1);

#if defined (ACE_HAS_CPP11)
std::unique_ptr<ACE_Asynch_Result_Impl> safe_asynch_timer (asynch_timer);
#else
auto_ptr<ACE_Asynch_Result_Impl> safe_asynch_timer (asynch_timer);
#endif /* ACE_HAS_CPP11 */

// Post a completion.
if (-1 == safe_asynch_timer->post_completion
Expand Down
6 changes: 2 additions & 4 deletions ACE/ace/Process_Manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -243,15 +243,14 @@ class ACE_Export ACE_Process_Manager : protected ACE_Event_Handler
* @retval 0 on success; -1 on failure.
*/
int wait (const ACE_Time_Value &timeout = ACE_Time_Value::max_time);
#if defined (ACE_HAS_CPP11)

/// @sa wait
template< class Rep, class Period >
int wait (const std::chrono::duration<Rep, Period>& timeout)
{
ACE_Time_Value const tv (timeout);
return this->wait (tv);
}
#endif

/**
* Wait up to @a timeout for a single specified process to terminate.
Expand All @@ -269,7 +268,7 @@ class ACE_Export ACE_Process_Manager : protected ACE_Event_Handler
pid_t wait (pid_t pid,
const ACE_Time_Value &timeout,
ACE_exitcode *status = 0);
#if defined (ACE_HAS_CPP11)

/// @sa wait
template< class Rep, class Period >
pid_t wait (pid_t pid,
Expand All @@ -279,7 +278,6 @@ class ACE_Export ACE_Process_Manager : protected ACE_Event_Handler
ACE_Time_Value const tv (timeout);
return this->wait (pid, tv, status);
}
#endif

/**
* Wait indefinitely for a single, specified process to terminate.
Expand Down
7 changes: 3 additions & 4 deletions ACE/ace/Reactor.h
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ class ACE_Export ACE_Reactor : public ACE_Reactor_Timer_Interface
const ACE_Time_Value &delay,
const ACE_Time_Value &interval =
ACE_Time_Value::zero);
#if defined (ACE_HAS_CPP11)

template<class Rep1, class Period1, class Rep2 = int, class Period2 = std::ratio<1>>
long schedule_timer (ACE_Event_Handler *event_handler,
const void *arg,
Expand All @@ -581,7 +581,7 @@ class ACE_Export ACE_Reactor : public ACE_Reactor_Timer_Interface
ACE_Time_Value const tv_interval (interval);
return this->schedule_timer (event_handler, arg, tv_delay, tv_interval);
}
#endif

/**
* Reset recurring timer interval.
*
Expand All @@ -595,15 +595,14 @@ class ACE_Export ACE_Reactor : public ACE_Reactor_Timer_Interface
*/
virtual int reset_timer_interval (long timer_id,
const ACE_Time_Value &interval);
#if defined (ACE_HAS_CPP11)

template<class Rep, class Period>
int reset_timer_interval (long timer_id,
const std::chrono::duration<Rep, Period>& interval)
{
ACE_Time_Value const tv_interval (interval);
return this->reset_timer_interval (timer_id, tv_interval);
}
#endif

/**
* Cancel timer.
Expand Down
5 changes: 1 addition & 4 deletions ACE/ace/Reactor_Timer_Interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ class ACE_Export ACE_Reactor_Timer_Interface
const ACE_Time_Value &delay,
const ACE_Time_Value &interval = ACE_Time_Value::zero) = 0;

#if defined (ACE_HAS_CPP11)
template<class Rep1, class Period1, class Rep2 = int, class Period2 = std::ratio<1>>
long schedule_timer (ACE_Event_Handler *event_handler,
const void *arg,
Expand All @@ -49,19 +48,17 @@ class ACE_Export ACE_Reactor_Timer_Interface
ACE_Time_Value const tv_interval (interval);
return this->schedule_timer (event_handler, arg, tv_delay, tv_interval);
}
#endif

virtual int reset_timer_interval (long timer_id,
const ACE_Time_Value &interval) = 0;
#if defined (ACE_HAS_CPP11)

template<class Rep, class Period>
int reset_timer_interval (long timer_id,
const std::chrono::duration<Rep, Period>& interval)
{
ACE_Time_Value const tv_interval (interval);
return this->reset_timer_interval (timer_id, tv_interval);
}
#endif

virtual int cancel_timer (long timer_id,
const void **arg = 0,
Expand Down
Loading

0 comments on commit 194911f

Please sign in to comment.