1 //===----------------------------------------------------------------------===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is dual licensed under the MIT and the University of Illinois Open 6 // Source Licenses. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 10 // <locale> 11 12 // class money_base 13 // { 14 // public: 15 // enum part {none, space, symbol, sign, value}; 16 // struct pattern {char field[4];}; 17 // }; 18 19 #include <locale> 20 #include <cassert> 21 22 int main() 23 { 24 std::money_base mb; 25 assert(mb.none == 0); 26 assert(mb.space == 1); 27 assert(mb.symbol == 2); 28 assert(mb.sign == 3); 29 assert(mb.value == 4); 30 assert(sizeof(std::money_base::pattern) == 4); 31 std::money_base::pattern p; 32 p.field[0] = std::money_base::none; 33 } 34