1 //===----------------------------------------------------------------------===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is dual licensed under the MIT and the University of Illinois Open 6 // Source Licenses. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 10 // UNSUPPORTED: c++03, c++11, c++14 11 // <chrono> 12 13 // ceil 14 15 // template <class Rep, class Period> 16 // constexpr duration<Rep, Period> abs(duration<Rep, Period> d) 17 18 // This function shall not participate in overload resolution unless numeric_limits<Rep>::is_signed is true. 19 20 #include <chrono> 21 22 typedef std::chrono::duration<unsigned> unsigned_secs; 23 24 int main() 25 { 26 std::chrono::abs(unsigned_secs(0)); 27 } 28