1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // REQUIRES: locale.en_US.UTF-8
11 // REQUIRES: locale.fr_FR.UTF-8
15 // template <class charT, class traits = char_traits<charT> >
16 // class basic_streambuf;
18 // locale pubimbue(const locale& loc);
19 // locale getloc() const;
24 #include "platform_support.h" // locale name macros
26 template <class CharT>
28 : public std::basic_streambuf<CharT>
32 void imbue(const std::locale&)
34 assert(this->getloc().name() == LOCALE_en_US_UTF_8);
42 assert(t.getloc().name() == "C");
44 std::locale::global(std::locale(LOCALE_en_US_UTF_8));
47 assert(t.getloc().name() == LOCALE_en_US_UTF_8);
48 assert(t.pubimbue(std::locale(LOCALE_fr_FR_UTF_8)).name() == "en_US.UTF-8");
49 assert(t.getloc().name() == LOCALE_fr_FR_UTF_8);