[PowerPC][NFC] Cleanup PPCCTRLoopsVerify pass
[llvm-project.git] / libcxx / test / std / strings / string.view / string.view.io / stream_insert_decl_present.compile.pass.cpp
blob444f262fcaa7afdb73af1fad70933d6964564f09
1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 // <string>
11 // template<class charT, class traits, class Allocator>
12 // basic_ostream<charT, traits>&
13 // operator<<(basic_ostream<charT, traits>& os,
14 // const basic_string_view<charT,traits> str);
16 #include <string_view>
17 #include <iosfwd>
19 template <class SV, class = void>
20 struct HasDecl : std::false_type {};
21 template <class SV>
22 struct HasDecl<SV, decltype(static_cast<void>(std::declval<std::ostream&>() << std::declval<SV&>()))> : std::true_type {};
24 static_assert(HasDecl<std::string_view>::value, "streaming operator declaration not present");