Changeset 78a794ab in mainline


Ignore:
Timestamp:
2018-07-05T21:41:23Z (6 years ago)
Author:
Dzejrou <dzejrou@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d275344
Parents:
13f7525
git-author:
Dzejrou <dzejrou@…> (2018-05-04 19:18:52)
git-committer:
Dzejrou <dzejrou@…> (2018-07-05 21:41:23)
Message:

cpp: added standard manipulators to iomanip

Location:
uspace/lib/cpp
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/cpp/Makefile

    r13f7525 r78a794ab  
    4040        src/condition_variable.cpp \
    4141        src/exception.cpp \
     42        src/iomanip.cpp \
    4243        src/ios.cpp \
    4344        src/iostream.cpp \
  • uspace/lib/cpp/include/impl/iomanip.hpp

    r13f7525 r78a794ab  
    3030#define LIBCPP_IOMANIP
    3131
    32 #error "<iomanip> is not implemented"
     32#include <internal/iomanip.hpp>
     33#include <iosfwd>
    3334
    34 // TODO: implement
     35namespace std
     36{
     37    /**
     38     * 27.7.4, standard manipulators:
     39     */
     40
     41    aux::manip_wrapper<aux::resetiosflags_t> resetiosflags(ios_base::fmtflags mask);
     42    aux::manip_wrapper<aux::setiosflags_t> setiosflags(ios_base::fmtflags mask);
     43    aux::manip_wrapper<aux::setbase_t> setbase(int base);
     44
     45    template<class Char>
     46    aux::setfill_t<Char> setfill(Char c)
     47    {
     48        return aux::setfill_t<Char>{c};
     49    }
     50
     51    aux::manip_wrapper<aux::setprecision_t> setprecision(int prec);
     52    aux::manip_wrapper<aux::setw_t> setw(int width);
     53}
    3554
    3655#endif
Note: See TracChangeset for help on using the changeset viewer.