util: fix clang 3.4 time::abs compilation error
This commit also adds a test case for time::abs function template.
refs #3698
Change-Id: I32c3d15362d5515841a95ce6d9804be11df632b5
diff --git a/src/util/time.hpp b/src/util/time.hpp
index f8bcabc..e239ccd 100644
--- a/src/util/time.hpp
+++ b/src/util/time.hpp
@@ -48,7 +48,7 @@
* unless std::numeric_limits<Rep>::is_signed is true.
*/
template<typename Rep, typename Period,
- typename = typename std::enable_if<duration<Rep, Period>::min() < duration<Rep, Period>::zero()>::type>
+ typename = typename std::enable_if<std::numeric_limits<Rep>::is_signed>::type>
constexpr duration<Rep, Period>
abs(duration<Rep, Period> d)
{