mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-12-16 03:08:52 +08:00
feat: add stream operator to value
This commit is contained in:
@@ -1189,6 +1189,13 @@ std::string format(const std::vector<typename basic_value<TC>::key_type>& ks,
|
|||||||
return ser(ks, v);
|
return ser(ks, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<typename TC>
|
||||||
|
std::ostream& operator<<(std::ostream& os, const basic_value<TC>& v)
|
||||||
|
{
|
||||||
|
os << format(v);
|
||||||
|
return os;
|
||||||
|
}
|
||||||
|
|
||||||
} // toml
|
} // toml
|
||||||
|
|
||||||
#if defined(TOML11_COMPILE_SOURCES)
|
#if defined(TOML11_COMPILE_SOURCES)
|
||||||
|
|||||||
Reference in New Issue
Block a user