xo-umbrella2/xo-flatstring/include/xo/flatstring/flatstring_iostream.hpp
Roland Conybeare fa57de89fe git subrepo clone (merge) git@github.com:Rconybea/xo-flatstring xo-flatstring
subrepo:
  subdir:   "xo-flatstring"
  merged:   "996c220e"
upstream:
  origin:   "git@github.com:Rconybea/xo-flatstring"
  branch:   "main"
  commit:   "996c220e"
git-subrepo:
  version:  "0.4.9"
  origin:   "???"
  commit:   "???"
2026-06-06 21:34:32 -04:00

37 lines
763 B
C++

/** @file flatstring_iostream.hpp
*
* Author: Roland Conybeare
**/
#pragma once
#include "flatstring.hpp"
#include <ostream>
//#include <cstdint>
namespace xo {
/** @brief print flatstring on stream os.
*
**/
template <std::size_t N>
void
print_flatstring (std::ostream & os, const flatstring<N> & x) {
os << x.c_str();
}
/** @brief print flatstring x on stream os.
*
* Example
* @code
* cout << flatstring("foo"); // outputs "foo"
* @endcode
**/
template <std::size_t N>
inline std::ostream &
operator<< (std::ostream & os, const flatstring<N> & x) {
print_flatstring(os, x);
return os;
}
} /*namespace xo*/
/** end flatstring_iostream.hpp **/