Flow-IPC 1.0.0
Flow-IPC project: Full implementation reference.
Functions
capnp Namespace Reference

Small group of miscellaneous utilities to ease work with capnp (Cap'n Proto), joining its capnp namespace. More...

Functions

std::ostream & operator<< (std::ostream &os, const Text::Reader &val)
 Prints string representation of the given capnp::Text::Reader to the given ostream. More...
 

Detailed Description

Small group of miscellaneous utilities to ease work with capnp (Cap'n Proto), joining its capnp namespace.

As of this writing circumstances have to very particular and rare indeed for something to actually be added by us to this namespace. As I write this, it contains only oparator<<(std::ostream&, capnp::Text::Reader&).

Function Documentation

◆ operator<<()

std::ostream & capnp::operator<< ( std::ostream &  os,
const Text::Reader &  val 
)

Prints string representation of the given capnp::Text::Reader to the given ostream.

Rationale for existence

Well, capnp does not provide it, even though it provides a conversion operator to string and such; and it's nice to be able to print these (particularly when logging with FLOW_LOG_*()). For whatever reason the auto-conversion operator does not "kick in" when placed in a an ostream<< context; so such printing does not compile (nor does lexical_cast<string>).

It won't be forced on anyone that doesn't include the present detail/ header.

Parameters
osStream to which to write.
valObject to serialize.
Returns
os.

Definition at line 190 of file heap_serializer.cpp.