minix/external/bsd/libc++/dist/libcxx/test/utilities/time/time.duration/time.duration.cons/rep02.pass.cpp
Lionel Sambuc 4684ddb6aa LLVM Minix changes
- import libcxx
 - reduce targets to the one when compiled as a tools

Change-Id: Iabb8427f80ff8e89463559a28bcb8b4f2bdbc496
2014-07-28 17:05:59 +02:00

30 lines
730 B
C++

//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// <chrono>
// duration
// template <class Rep2>
// explicit duration(const Rep2& r);
// construct double with int
#include <chrono>
#include <cassert>
int main()
{
std::chrono::duration<double> d(5);
assert(d.count() == 5);
#ifndef _LIBCPP_HAS_NO_CONSTEXPR
constexpr std::chrono::duration<double> d2(5);
static_assert(d2.count() == 5, "");
#endif
}