summaryrefslogtreecommitdiffstats
path: root/libcxx/test/libcxx/input.output/iostream.format/output.streams/traits_mismatch.fail.cpp
blob: fab0dd43657725c638ac8f8a076358a0bf064704 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
//===----------------------------------------------------------------------===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

// <ostream>

// template <class charT, class traits = char_traits<charT> >
// class basic_ostream;

// The char type of the stream and the char_type of the traits have to match

#include <ostream>
#include <type_traits>
#include <cassert>

struct test_ostream
    : public std::basic_ostream<char, std::char_traits<wchar_t> > {};


int main()
{
//  expected-error-re@ios:* {{static_assert failed{{.*}} "traits_type::char_type must be the same type as CharT"}}
}

OpenPOWER on IntegriCloud