26 lines · cpp
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-exception6//7//===----------------------------------------------------------------------===//8 9// <sstream>10 11// template<class charT, class traits = char_traits<charT>,12// class Allocator = allocator<charT>>13// class basic_stringbuf;14//15// The char type of the stream and the char_type of the traits have to match16 17// UNSUPPORTED: no-wide-characters18 19#include <sstream>20 21std::basic_stringbuf<char, std::char_traits<wchar_t> > sb;22// expected-error-re@*:* {{static assertion failed{{.*}}traits_type::char_type must be the same type as CharT}}23// expected-error-re@*:* {{static assertion failed{{.*}}traits_type::char_type must be the same type as CharT}}24 25// expected-error@*:* 5 {{only virtual member functions can be marked 'override'}}26