Library of Assembled Shared Sources
Extended_io

Detailed Description

extra insertors and extractors.

Author
Bram de Greve [BdG]

ExtendedIo groups additional stream operators for std::pair and standard containers like std::vector, std::list, ... By including this header, it will possible to output these types to a stream, just like a regular float.

Currently, the containers only have output operators, only std::pair has both the output and input operator. This will probably change in the future when there's a need for it.

The supported standard containers are std::vector, std::list, std::deque, std::map, std::multimap, std::set, std::multiset.

STLport specific: in case std::slist is detected as included, it is supported as well.

std::pair<int, std::string> a(5, "hello");
std::cout << a; // (5, hello)
std::cin >> a;
std::vector<int> b;
b.push_back(1);
b.push_back(2);
b.push_back(3);
std::cout << b; // [1, 2, 3]
std::map<std::string, int> c;
c["foo"] = 1;
c["bar"] = 2;
c["spam"] = 3;
c << map; // {bar: 2, foo: 1, spam: 3}
std::set<std::string> d;
d.insert("foo");
d.insert("bar");
d.insert("spam");
stream << d; // {bar, foo, spam}
Note
we need to inject all this stuff in the std namespace for the look up thingies to work.