Type of these manipulators std::ios_base &(std::ios_base &str). These are the functions.
That means what you need to use std::vector<std::ios_base &(*)(std::ios_base &str)> FlagArray;.
Here is what your code looks like:
#include <iostream>
#include <vector>
#include <ios>
typedef std::vector<std::ios_base &(*)(std::ios_base &str)> FlagArray;
int main() {
FlagArray tmp1 = {std::fixed,std::scientific};
FlagArray tmp2 = {std::internal,std::right,std::left};
FlagArray tmp3 = {std::uppercase,std::showbase,std::showpoint,std::showpos};
return 0;
}
source
share