1 //===----------------------------------------------------------------------===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 // <ios> 10 11 // class ios_base 12 13 // fmtflags flags(fmtflags fmtfl); 14 15 #include <ios> 16 #include <cassert> 17 18 class test 19 : public std::ios 20 { 21 public: 22 test() 23 { 24 init(0); 25 } 26 }; 27 28 int main(int, char**) 29 { 30 test t; 31 assert(t.flags() == (test::skipws | test::dec)); 32 test::fmtflags f = t.flags(test::hex | test::right); 33 assert(f == (test::skipws | test::dec)); 34 assert(t.flags() == (test::hex | test::right)); 35 36 return 0; 37 } 38