Howard Hinnant | 87d1a8a | 2010-05-30 21:39:41 +0000 | [diff] [blame] | 1 | //===----------------------------------------------------------------------===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
Howard Hinnant | b64f8b0 | 2010-11-16 22:09:02 +0000 | [diff] [blame] | 5 | // This file is dual licensed under the MIT and the University of Illinois Open |
| 6 | // Source Licenses. See LICENSE.TXT for details. |
Howard Hinnant | 87d1a8a | 2010-05-30 21:39:41 +0000 | [diff] [blame] | 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | // <codecvt> |
| 11 | |
| 12 | // template <class Elem, unsigned long Maxcode = 0x10ffff, |
| 13 | // codecvt_mode Mode = (codecvt_mode)0> |
| 14 | // class codecvt_utf16 |
| 15 | // : public codecvt<Elem, char, mbstate_t> |
| 16 | // { |
| 17 | // // unspecified |
| 18 | // }; |
| 19 | |
| 20 | // bool always_noconv() const throw(); |
| 21 | |
| 22 | #include <codecvt> |
| 23 | #include <cassert> |
| 24 | |
| 25 | int main() |
| 26 | { |
| 27 | { |
| 28 | typedef std::codecvt_utf16<wchar_t> C; |
| 29 | C c; |
| 30 | bool r = c.always_noconv(); |
| 31 | assert(r == false); |
| 32 | } |
| 33 | { |
| 34 | typedef std::codecvt_utf16<char16_t> C; |
| 35 | C c; |
| 36 | bool r = c.always_noconv(); |
| 37 | assert(r == false); |
| 38 | } |
| 39 | { |
| 40 | typedef std::codecvt_utf16<char32_t> C; |
| 41 | C c; |
| 42 | bool r = c.always_noconv(); |
| 43 | assert(r == false); |
| 44 | } |
| 45 | } |