C++ Logo

std-proposals

Advanced search

Re: [std-proposals] std::any::base

From: Sebastian Wittmeier <wittmeier_at_[hidden]>
Date: Mon, 15 Apr 2024 13:02:20 +0200
Does the base function throw, if the base is not unique for the derived class object in any?   This condition cannot be detected at compile-time, as the dynamic type of the object in any (and therefore its ancestry relationship) is not known.   -----Ursprüngliche Nachricht----- Von:Frederick Virchanza Gotham via Std-Proposals <std-proposals_at_[hidden]> Gesendet:Mo 15.04.2024 12:45 Betreff:[std-proposals] std::any::base An:std-proposals <std-proposals_at_[hidden]>; CC:Frederick Virchanza Gotham <cauldwell.thomas_at_[hidden]>; In the previous two threads entitled:    "Extend std::type_info with more information"    "Use the exception system to check for bases at runtime" People were not much interested in extending "std::type_info", but rather were particularly interested in adding a new member function to "std::any". Here's the beginnings of a paper for std::any::base:    http://www.virjacode.com/papers/any_base.htm The implementations are provided in the paper purely just to show that it's possible without an ABI  break. Compiler vendors will implement it much more efficiently. -- Std-Proposals mailing list Std-Proposals_at_[hidden] https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals

Received on 2024-04-15 11:02:26