JH-Toolkit v1.4.1
An engineering-oriented C++20 toolkit with duck-typed concepts, static design, async coroutines, and semantic containers — header-only, RTTI-free, and concurrency-friendly.
Loading...
Searching...
No Matches
jh::pod::streamable_pod Concept Reference

Debug-only constraint for POD-like types printable to std::ostream. More...

#include <jh/pods/stringify.h>

Concept definition

template<typename T>
concept streamable_pod =
!std::is_fundamental_v<T> &&
!std::is_enum_v<T> &&
!std::is_pointer_v<T>
Concept for types that are safe to treat as plain old data (POD).
Definition pod_like.h:44
Debug-only constraint for POD-like types printable to std::ostream.
Definition stringify.h:172
Checks whether a type can be streamed to std::ostream.
Definition stringify.h:142

Detailed Description

Debug-only constraint for POD-like types printable to std::ostream.

Combines jh::pod::pod_like with streamable, while explicitly excluding fundamental types, enums, and raw pointers.

This concept exists solely to enable the printers in the jh::pod's stringify submodule.

Note
Important: This constraint is intentionally weak and easily affected by ADL and using-introduced operator<< overloads. The exact set of printable types may change depending on the surrounding namespace context.
Because of this, it is not suitable as a production or contractual constraint. Its purpose is debugging, inspection, and logging only, where observability is preferred over strict interface guarantees.
Warning
Do not rely on this concept for serialization, persistence, ABI logic, or cross-module interface enforcement.