C++ Logo

std-proposals

Advanced search

Re: [std-proposals] std::chimeric_ptr -- it's alive... it's ALIVE!

From: Andre Kostur <andre_at_[hidden]>
Date: Fri, 21 Nov 2025 11:04:55 -0800
That's a choice: what were the considerations about behaving
consistently with multiple inheritance where that becomes an ambiguous
call and thus a compile-time error? The specification doesn't seem to
clearly state that choice either. The specification did say "the
compiler tries to find the member object/function in all of the base
classes specified".

On Fri, Nov 21, 2025 at 10:55 AM Frederick Virchanza Gotham via
Std-Proposals <std-proposals_at_[hidden]> wrote:
>
> On Fri, Nov 21, 2025 at 6:41 PM Andre Kostur wrote:
> >
> > Also, what if Text and Colorful both have a set_common() function, and
> > gets called in set_text_and_color ?
>
>
> The first class in the template parameter pack wins.
>
> std::chimeric_ptr< Colourful, Text >
> std::chimeric_ptr< Text, Colourful >
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals

Received on 2025-11-21 19:05:08