~ubuntu-branches/ubuntu/saucy/libc++/saucy-proposed

« back to all changes in this revision

Viewing changes to libcxx/test/utilities/time/time.duration/time.duration.special/zero.pass.cpp

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru, Andrej Belym
  • Date: 2012-08-01 10:38:08 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20120801103808-n4qy15hxyhj3vxgi
Tags: 1.0~svn161106-1~exp1
* New snapshot release

[ Andrej Belym ]
* Multiarch support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
template <class D>
22
22
void test()
23
23
{
 
24
    {
24
25
    typedef typename D::rep Rep;
25
26
    Rep zero_rep = std::chrono::duration_values<Rep>::zero();
26
27
    assert(D::zero().count() == zero_rep);
 
28
    }
 
29
#ifndef _LIBCPP_HAS_NO_CONSTEXPR
 
30
    {
 
31
    typedef typename D::rep Rep;
 
32
    constexpr Rep zero_rep = std::chrono::duration_values<Rep>::zero();
 
33
    static_assert(D::zero().count() == zero_rep, "");
 
34
    }
 
35
#endif
27
36
}
28
37
 
29
38
int main()