template<
typename T>
class nros::Expected< T >
Phase 123.B.4 — templated value-or-error wrapper.
Lets factory functions return constructed entities by value instead of forcing the out-param + Result idiom. Trade-off: requires T to be default-constructible and move-constructible (Node, Publisher, Subscription all satisfy both today). Storage is direct (the value lives inline, no allocation) — when the result holds an error the value member is default-constructed and idle.
Usage:
auto node_r = nros::Node::make(
"my_node");
Out-param create_node(node, "name") remains the canonical zero-cost API for embedded / strictly-no-alloc code; make() is a hosted-friendly convenience that closes the rclcpp / rclrs idiom gap.