OpenVPN 3 Core Library
Loading...
Searching...
No Matches
ostream_containers.hpp File Reference

Coercion safe method to insert a container into an ostream. More...

#include <ostream>
Include dependency graph for ostream_containers.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  openvpn::C2os::Container< C >
 New typename for holding the underlying container type. More...
 
struct  openvpn::C2os::PtrContainer< C >
 same idea as C2os::Container<C>, above; importantly, with a different typename More...
 

Namespaces

namespace  openvpn
 
namespace  openvpn::C2os
 

Functions

template<typename C >
const auto openvpn::C2os::cast (const C &container)
 Provide an instance of C2os::Container<C> from the underlying container.
 
template<typename C >
std::ostream & openvpn::C2os::operator<< (std::ostream &os, const Container< C > &container)
 overload ostream operator<< for the C2os::Container<C> type
 
template<typename C >
const auto openvpn::C2os::cast_deref (const C &container)
 Provide an instance of C2os::PtrContainer<C> from the underlying container.
 
template<typename C >
std::ostream & openvpn::C2os::operator<< (std::ostream &os, const PtrContainer< C > &container)
 overload ostream operator<< for the C2os::PtrContainer<C> type
 

Detailed Description

Coercion safe method to insert a container into an ostream.

The contained type T must be ostream'able

Definition in file ostream_containers.hpp.