brintos

brintos / llvm-project-archived public Read only

0
0
Text · 733 B · bc862cc Raw
30 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// <ios>10 11// template <class charT, class traits> class basic_ios12 13// char narrow(char_type c, char dfault) const;14 15// XFAIL: no-wide-characters16 17#include <ios>18#include <cassert>19 20#include "test_macros.h"21 22int main(int, char**)23{24    const std::wios ios(0);25    assert(ios.narrow(L'c', '*') == 'c');26    assert(ios.narrow(L'\u203C', '*') == '*');27 28  return 0;29}30