//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // class moneypunct // string grouping() const; // The C++ and C standards are silent. // POSIX standard is being followed (as a guideline). #include #include #include #include "test_macros.h" typedef std::moneypunct F; class Fnf : public std::moneypunct { public: explicit Fnf(std::size_t refs = 0) : std::moneypunct(refs) {} }; class Fnt : public std::moneypunct { public: explicit Fnt(std::size_t refs = 0) : std::moneypunct(refs) {} }; #ifndef TEST_HAS_NO_WIDE_CHARACTERS class Fwf : public std::moneypunct { public: explicit Fwf(std::size_t refs = 0) : std::moneypunct(refs) {} }; class Fwt : public std::moneypunct { public: explicit Fwt(std::size_t refs = 0) : std::moneypunct(refs) {} }; #endif // TEST_HAS_NO_WIDE_CHARACTERS int main(int, char**) { { Fnf f(1); assert(f.grouping() == std::string()); } { Fnt f(1); assert(f.grouping() == std::string()); } #ifndef TEST_HAS_NO_WIDE_CHARACTERS { Fwf f(1); assert(f.grouping() == std::string()); } { Fwt f(1); assert(f.grouping() == std::string()); } #endif return 0; }