Howard Hinnant | 7050530 | 2010-06-17 00:34:59 | [diff] [blame] | 1 | //===----------------------------------------------------------------------===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | // <regex> |
| 11 | |
| 12 | // template <class charT> struct regex_traits; |
| 13 | |
| 14 | // locale_type imbue(locale_type l); |
| 15 | |
| 16 | #include <regex> |
Howard Hinnant | 24757ff | 2010-06-21 21:01:43 | [diff] [blame^] | 17 | #include <locale> |
| 18 | #include <cassert> |
Howard Hinnant | 7050530 | 2010-06-17 00:34:59 | [diff] [blame] | 19 | |
| 20 | int main() |
| 21 | { |
Howard Hinnant | 24757ff | 2010-06-21 21:01:43 | [diff] [blame^] | 22 | { |
| 23 | std::regex_traits<char> t; |
| 24 | std::locale loc = t.imbue(std::locale("en_US")); |
| 25 | assert(loc.name() == "C"); |
| 26 | assert(t.getloc().name() == "en_US"); |
| 27 | } |
Howard Hinnant | 7050530 | 2010-06-17 00:34:59 | [diff] [blame] | 28 | } |