Add a bit more to one of the chrono tests

llvm-svn: 298418
This commit is contained in:
Marshall Clow 2017-03-21 18:40:46 +00:00
parent 40a4f40679
commit c3d7b98d9d
1 changed files with 11 additions and 0 deletions

View File

@ -32,4 +32,15 @@ int main()
static_assert(m.count() == m2.count(), "");
}
#endif
// P0548
{
typedef std::chrono::duration<int, std::ratio<10,10> > D10;
typedef std::chrono::duration<int, std::ratio< 1, 1> > D1;
D10 zero{0};
D10 one{1};
static_assert( (std::is_same< decltype(+one), decltype(zero-one) >::value), "");
static_assert( (std::is_same< decltype(zero+one), D1>::value), "");
static_assert( (std::is_same< decltype(+one), D1>::value), "");
}
}