blob: 5a6a99d0ab05444c9bc27cc8c281b5efc40174b9 [file] [log] [blame]
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
// <locale>
// template <> class codecvt<wchar_t, char, mbstate_t>
// int encoding() const throw();
// XFAIL: libcpp-has-no-wide-characters
#include <locale>
#include <cassert>
#include "test_macros.h"
typedef std::codecvt<wchar_t, char, std::mbstate_t> F;
int main(int, char**)
{
std::locale l = std::locale::classic();
const F& f = std::use_facet<F>(l);
assert(f.encoding() == 1);
return 0;
}