Add a bit more to one of the chrono tests
llvm-svn: 298418
This commit is contained in:
parent
40a4f40679
commit
c3d7b98d9d
|
@ -32,4 +32,15 @@ int main()
|
||||||
static_assert(m.count() == m2.count(), "");
|
static_assert(m.count() == m2.count(), "");
|
||||||
}
|
}
|
||||||
#endif
|
#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), "");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue