mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-23 18:38:30 +08:00

This is a huge cleanup that helps make the libc++ test suite more portable. Patch from STL@microsoft.com. Thanks STL! git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272716 91177308-0d34-0410-b5e6-96231b3b80d8
31 lines
756 B
C++
31 lines
756 B
C++
//===----------------------------------------------------------------------===//
|
|
//
|
|
// 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.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// <string>
|
|
|
|
// template<> struct char_traits<char32_t>
|
|
|
|
// static void assign(char_type& c1, const char_type& c2);
|
|
|
|
#include <string>
|
|
#include <cassert>
|
|
|
|
#include "test_macros.h"
|
|
|
|
int main()
|
|
{
|
|
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
|
#if TEST_STD_VER >= 11
|
|
char32_t c = U'\0';
|
|
std::char_traits<char32_t>::assign(c, U'a');
|
|
assert(c == U'a');
|
|
#endif
|
|
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
|
}
|