| //===----------------------------------------------------------------------===// |
| // The LLVM Compiler Infrastructure |
| // This file is distributed under the University of Illinois Open Source |
| // License. See LICENSE.TXT for details. |
| //===----------------------------------------------------------------------===// |
| // template <class charT, class traits = char_traits<charT> > |
| // basic_filebuf<charT,traits>* rdbuf() const; |
| std::ofstream fs("test.dat"); |
| std::filebuf* fb = fs.rdbuf(); |
| assert(fb->sputc('r') == 'r'); |
| std::wofstream fs("test.dat"); |
| std::wfilebuf* fb = fs.rdbuf(); |
| assert(fb->sputc(L'r') == L'r'); |