From fde236b1f719b3a366af4cd5810e847cdb18e480 Mon Sep 17 00:00:00 2001 From: Marshall Clow Date: Thu, 8 Aug 2019 14:36:07 +0000 Subject: Implement hh_mm_ss from P1466R3. Reviewed as https://reviews.llvm.org/D65365. llvm-svn: 368299 --- .../std/utilities/time/time.hms/hhmmss.fail.cpp | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 libcxx/test/std/utilities/time/time.hms/hhmmss.fail.cpp (limited to 'libcxx/test/std/utilities/time/time.hms/hhmmss.fail.cpp') diff --git a/libcxx/test/std/utilities/time/time.hms/hhmmss.fail.cpp b/libcxx/test/std/utilities/time/time.hms/hhmmss.fail.cpp new file mode 100644 index 00000000000..8849831d915 --- /dev/null +++ b/libcxx/test/std/utilities/time/time.hms/hhmmss.fail.cpp @@ -0,0 +1,29 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 +// + +// template class hh_mm_ss; +// If Duration is not an instance of duration, the program is ill-formed. + +#include +#include +#include +#include "test_macros.h" + +struct A {}; + +int main(int, char**) +{ + std::chrono::hh_mm_ss h0; // expected-error-re@chrono:* {{static_assert failed {{.*}} "template parameter of hh_mm_ss must be a std::chrono::duration"}} + std::chrono::hh_mm_ss h1; // expected-error-re@chrono:* {{static_assert failed {{.*}} "template parameter of hh_mm_ss must be a std::chrono::duration"}} + std::chrono::hh_mm_ss h2; // expected-error-re@chrono:* {{static_assert failed {{.*}} "template parameter of hh_mm_ss must be a std::chrono::duration"}} + std::chrono::hh_mm_ss h3; // expected-error-re@chrono:* {{static_assert failed {{.*}} "template parameter of hh_mm_ss must be a std::chrono::duration"}} + + return 0; +} -- cgit v1.2.3