//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // class num_put // iter_type put(iter_type s, ios_base& iob, char_type fill, void* v) const; #include #include #include #include #include "test_iterators.h" typedef std::num_put > F; class my_facet : public F { public: explicit my_facet(std::size_t refs = 0) : F(refs) {} }; int main() { const my_facet f(1); { std::ios ios(0); void* v = 0; char str[50]; output_iterator iter = f.put(output_iterator(str), ios, '*', v); std::string ex(str, iter.base()); assert(ex == "0x0" || ex == "(nil)"); } }