Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
CLI::enums Namespace Reference

Functions

template<typename T , typename = typename std::enable_if<std::is_enum<T>::value>::type>
std::ostream & operator<< (std::ostream &in, const T &item)
 output streaming for enumerations
 

Detailed Description

Include the items in this namespace to get free conversion of enums to/from streams. (This is available inside CLI as well, so CLI11 will use this without a using statement).

Function Documentation

◆ operator<<()

template<typename T , typename = typename std::enable_if<std::is_enum<T>::value>::type>
std::ostream & CLI::enums::operator<< ( std::ostream & in,
const T & item )

Definition at line 163 of file CLI11.hpp.

163 {
164 // make sure this is out of the detail namespace otherwise it won't be found when needed
165 return in << static_cast<typename std::underlying_type<T>::type>(item);
166}