literals.fail.cpp (860B)
1 //===----------------------------------------------------------------------===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is dual licensed under the MIT and the University of Illinois Open 6 // Source Licenses. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 10 // UNSUPPORTED: clang-5, clang-6 11 // UNSUPPORTED: apple-clang-6, apple-clang-7, apple-clang-8, apple-clang-9, apple-clang-10 12 13 // <chrono> 14 // class day; 15 16 // constexpr day operator""d(unsigned long long d) noexcept; 17 18 #include <chrono> 19 #include <type_traits> 20 #include <cassert> 21 22 #include "test_macros.h" 23 24 int main() 25 { 26 using day = std::chrono::day; 27 day d1 = 4d; // expected-error-re {{no matching literal operator for call to 'operator""d' {{.*}}}} 28 }