xo-reader2 stack: expand symbol table to store typedefs

+ typedef utest
+ misc qol policy choices
This commit is contained in:
Roland Conybeare 2026-03-11 07:49:14 -05:00
commit 61c0342233
2 changed files with 4 additions and 4 deletions

View file

@ -249,7 +249,7 @@ namespace xo {
template <typename AFacet, typename DRepr>
template <typename AOther>
obj<AOther,DRepr>
obj<AFacet,DRepr>::to_facet()
obj<AFacet,DRepr>::to_facet() const
{
if (this->data()) {
if constexpr (std::is_same_v<DRepr, DVariantPlaceholder>) {
@ -270,7 +270,7 @@ namespace xo {
template <typename AFacet, typename DRepr>
template <typename AOther>
obj<AOther,DRepr>
obj<AFacet,DRepr>::try_to_facet() noexcept
obj<AFacet,DRepr>::try_to_facet() const noexcept
{
if (this->data()) {
if constexpr (std::is_same_v<DRepr, DVariantPlaceholder>) {

View file

@ -135,13 +135,13 @@ namespace xo {
* Definition in FacetRegistry.hpp, to avoid #include dependency
**/
template <typename AOther>
obj<AOther,DRepr> to_facet();
obj<AOther,DRepr> to_facet() const;
/** like to_facet<AOther>(),
* but on failure return empty obj instead of throwing exception
**/
template <typename AOther>
obj<AOther,DRepr> try_to_facet() noexcept;
obj<AOther,DRepr> try_to_facet() const noexcept;
/** enabled when RRouter<AFacet> provides _preincrement.
* Note we don't need this trick for comparison operators,