Mr.Docs The C++ Alliance GitHub Repo
  • Mr.Docs
  • Reference
  • mrdocs
  • cast_or_null-0f
master develop 2026.9.4 v0.8.0
Mr.Docs The C++ Alliance GitHub Repo

Mr.Docs

    • Home
    • Demos
    • Installation
    • Getting Started
    • The Configuration File
    • Documenting the Code
    • Generators
    • Design Notes
    • Library Reference
    • Contributor’s Guide
    • License

mrdocs::cast_or_null

Synopsis

Declared in <mrdocs/ADT/Polymorphic.hpp>

template<
    class To,
    class From>
requires ( std::derived_from<std::remove_cvref_t<To>, std::remove_cvref_t<From>> )
[[nodiscard]]
std::add_pointer_t<std::remove_reference_t<To> const>
cast_or_null(Polymorphic<From> const* pp);

Return Value

The return value should not be discarded.

Created with MrDocs