MCPcopy Create free account
hub / github.com/BowenFu/matchit.cpp / hasValue

Method hasValue

develop/matchit/patterns.h:805–814  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

803
804 constexpr auto &variant() { return mVariant; }
805 constexpr auto hasValue() const
806 {
807 return std::visit(overload([](Type const &)
808 { return true; },
809 [](Type const *)
810 { return true; },
811 [](std::monostate const &)
812 { return false; }),
813 mVariant);
814 }
815 constexpr decltype(auto) value() const
816 {
817 return std::visit(

Callers

nothing calls this directly

Calls 1

overloadFunction · 0.70

Tested by

no test coverage detected