2
0
mirror of https://github.com/boostorg/thread.git synced 2026-01-24 06:22:12 +00:00

Fixed compilation when Boost.Chrono is disabled by user.

[SVN r79753]
This commit is contained in:
Andrey Semashev
2012-07-26 08:08:06 +00:00
parent 3332d8df66
commit 0d9ebfc820
2 changed files with 6 additions and 1 deletions

View File

@@ -159,6 +159,7 @@ namespace boost
return timed_lock(system_time(timeout));
}
#ifdef BOOST_THREAD_USES_CHRONO
template <class Rep, class Period>
bool try_lock_for(const chrono::duration<Rep, Period>& rel_time)
{
@@ -209,6 +210,7 @@ namespace boost
}
return true;
}
#endif
void unlock()
{

View File

@@ -221,6 +221,7 @@ namespace boost
}
}
#ifdef BOOST_THREAD_USES_CHRONO
template <class Rep, class Period>
bool try_lock_shared_for(const chrono::duration<Rep, Period>& rel_time)
{
@@ -327,6 +328,7 @@ namespace boost
BOOST_ASSERT(res==0);
}
}
#endif
void unlock_shared()
{
@@ -490,7 +492,7 @@ namespace boost
}
}
#ifdef BOOST_THREAD_USES_CHRONO
template <class Rep, class Period>
bool try_lock_for(const chrono::duration<Rep, Period>& rel_time)
{
@@ -598,6 +600,7 @@ namespace boost
BOOST_ASSERT(wait_res<2);
}
}
#endif
void unlock()
{