2
0
mirror of https://github.com/boostorg/process.git synced 2026-01-19 04:22:15 +00:00

switched to BOOST_DEPRECATED.

This commit is contained in:
Klemens Morgenstern
2023-02-06 20:33:50 +08:00
committed by Klemens Morgenstern
parent 57b67e0173
commit 6f0d6a2e24
3 changed files with 8 additions and 25 deletions

View File

@@ -128,7 +128,7 @@ public:
#if !defined(BOOST_PROCESS_NO_DEPRECATED)
template< class Rep, class Period >
BOOST_PROCESS_DEPRECATED("wait_for is unreliable")
BOOST_DEPRECATED("wait_for is unreliable")
bool wait_for (const std::chrono::duration<Rep, Period>& rel_time)
{
std::error_code ec;
@@ -138,7 +138,7 @@ public:
}
template< class Clock, class Duration >
BOOST_PROCESS_DEPRECATED("wait_until is unreliable")
BOOST_DEPRECATED("wait_until is unreliable")
bool wait_until(const std::chrono::time_point<Clock, Duration>& timeout_time )
{
std::error_code ec;
@@ -185,14 +185,14 @@ public:
#if !defined(BOOST_PROCESS_NO_DEPRECATED)
template< class Rep, class Period >
BOOST_PROCESS_DEPRECATED("wait_for is unreliable")
BOOST_DEPRECATED("wait_for is unreliable")
bool wait_for (const std::chrono::duration<Rep, Period>& rel_time, std::error_code & ec) noexcept
{
return wait_until(std::chrono::steady_clock::now() + rel_time, ec);
}
template< class Clock, class Duration >
BOOST_PROCESS_DEPRECATED("wait_until is unreliable")
BOOST_DEPRECATED("wait_until is unreliable")
bool wait_until(const std::chrono::time_point<Clock, Duration>& timeout_time, std::error_code & ec) noexcept
{
if (!_exited())

View File

@@ -118,21 +118,4 @@ template<> constexpr wchar_t space_sign<wchar_t> () {return L' '; }
}
}
#if defined(__clang__)
# define BOOST_PROCESS_DEPRECATED(msg) __attribute__((deprecated(msg)))
#elif defined(__GNUC__)
# if __GNUC__ * 100 + __GNUC_MINOR__ >= 405
# define BOOST_PROCESS_DEPRECATED(msg) __attribute__((deprecated(msg)))
# else
# define BOOST_PROCESS_DEPRECATED(msg) __attribute__((deprecated))
# endif
#elif defined(_MSC_VER)
# define BOOST_PROCESS_DEPRECATED(msg) __declspec(deprecated(msg))
#elif defined(__sun)
# define BOOST_PROCESS_DEPRECATED(msg) __attribute__((deprecated(msg)))
#else
# define BOOST_PROCESS_DEPRECATED(msg)
#endif
#endif

View File

@@ -126,7 +126,7 @@ public:
/** Wait for the process group to exit for period of time.
* \return True if all child processes exited while waiting.*/
template< class Rep, class Period >
BOOST_PROCESS_DEPRECATED("wait_for is unreliable")
BOOST_DEPRECATED("wait_for is unreliable")
bool wait_for (const std::chrono::duration<Rep, Period>& rel_time)
{
return boost::process::detail::api::wait_for(_group_handle, rel_time);
@@ -134,7 +134,7 @@ public:
/** \overload bool wait_for(const std::chrono::duration<Rep, Period>& timeout_time ) */
template< class Rep, class Period >
BOOST_PROCESS_DEPRECATED("wait_for is unreliable")
BOOST_DEPRECATED("wait_for is unreliable")
bool wait_for (const std::chrono::duration<Rep, Period>& rel_time, std::error_code & ec) noexcept
{
return boost::process::detail::api::wait_for(_group_handle, rel_time, ec);
@@ -143,14 +143,14 @@ public:
/** Wait for the process group to exit until a point in time.
* \return True if all child processes exited while waiting.*/
template< class Clock, class Duration >
BOOST_PROCESS_DEPRECATED("wait_until is unreliable")
BOOST_DEPRECATED("wait_until is unreliable")
bool wait_until(const std::chrono::time_point<Clock, Duration>& timeout_time )
{
return boost::process::detail::api::wait_until(_group_handle, timeout_time);
}
/** \overload bool wait_until(const std::chrono::time_point<Clock, Duration>& timeout_time ) */
template< class Clock, class Duration >
BOOST_PROCESS_DEPRECATED("wait_until is unreliable")
BOOST_DEPRECATED("wait_until is unreliable")
bool wait_until(const std::chrono::time_point<Clock, Duration>& timeout_time, std::error_code & ec) noexcept
{
return boost::process::detail::api::wait_until(_group_handle, timeout_time, ec);