Correct the C++ standard references in QMutex functions
Section 30.4.1.3 [thread.timedmutex.requirements] has 16 paragraphs and 2 subsections. Change-Id: I9093948278414644a416fffd1473fec7fdd2716c Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
parent
8d6f2e7e15
commit
a6bc0157eb
@ -135,8 +135,8 @@ public:
|
|||||||
template <class Rep, class Period>
|
template <class Rep, class Period>
|
||||||
bool try_lock_for(std::chrono::duration<Rep, Period> duration)
|
bool try_lock_for(std::chrono::duration<Rep, Period> duration)
|
||||||
{
|
{
|
||||||
// § 30.4.1.3.5 [thread.timedmutex.requirements] specifies that a
|
// N4606 § 30.4.1.3 [thread.timedmutex.requirements]/5 specifies that
|
||||||
// duration less than or equal to duration.zero() shall result in a
|
// a duration less than or equal to duration.zero() shall result in a
|
||||||
// try_lock, unlike QMutex's tryLock with a negative duration which
|
// try_lock, unlike QMutex's tryLock with a negative duration which
|
||||||
// results in a lock.
|
// results in a lock.
|
||||||
|
|
||||||
@ -150,7 +150,7 @@ public:
|
|||||||
bool try_lock_until(std::chrono::time_point<Clock, Duration> timePoint)
|
bool try_lock_until(std::chrono::time_point<Clock, Duration> timePoint)
|
||||||
{
|
{
|
||||||
// Implemented in terms of try_lock_for to honor the similar
|
// Implemented in terms of try_lock_for to honor the similar
|
||||||
// requirement in § 30.4.1.3.12 [thread.timedmutex.requirements]
|
// requirement in N4606 § 30.4.1.3 [thread.timedmutex.requirements]/12.
|
||||||
|
|
||||||
return try_lock_for(timePoint - Clock::now());
|
return try_lock_for(timePoint - Clock::now());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user