{ "format": 1, "id": "saw-ref", "kind": "class", "name": "ref", "namespace": "saw", "module": "core", "header": "modules/core/c++/common.hpp", "brief_description": "Reference class for easier distinction of references and their referenced types.", "detailed_description": [ [ "Always refers to something, so unlike", {"name": "ptr", "id": "saw-ptr"}, "it has no empty state and no validity check." ], [ "Moving is forbidden, since that would invalidate the type, while copying is allowed. It is constexpr throughout, so it can be formed and followed at compile time." ] ], "templates": [ {"name": "T", "kind": "type"} ], "attributes": { "saw-ref-ref_": { "id": "saw-ref-ref_", "name": "ref_", "type": ["T *"], "visibility": "private" } }, "functions": { "saw-ref-ctor": { "id": "saw-ref-ctor", "name": "ref", "type": [], "parameters": [ {"name": "ref__", "type": ["T &"]} ] }, "saw-ref-call": { "id": "saw-ref-call", "name": "operator()", "type": ["T &"], "brief_description": "The referenced object." } } }