| 716 | using namespace cs; |
| 717 | |
| 718 | var fstream(const string &path, std::ios_base::openmode openmode) |
| 719 | { |
| 720 | if (openmode & std::ios_base::in) |
| 721 | return var::make<istream>(new std::ifstream(path, openmode)); |
| 722 | else if (openmode & std::ios_base::out || openmode & std::ios_base::app) |
| 723 | return var::make<ostream>(new std::ofstream(path, openmode)); |
| 724 | else |
| 725 | throw lang_error("Unsupported openmode."); |
| 726 | } |
| 727 | |
| 728 | void setprecision(const numeric &pre) |
| 729 | { |