Date: Sun, 21 Apr 2024 16:44:11 -0400
I had to write my own version of any, and I made my version of any_cast
work for Base (by throwing an exception, I know, gross, but it works).
I found it useful, and it also just seemed to make sense - does this `any`
that currently holds a Car hold a Vehicle? Yes. Give me a pointer to it.
On Mon, Apr 15, 2024 at 6:45 AM Frederick Virchanza Gotham via
Std-Proposals <std-proposals_at_[hidden]> wrote:
> 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
>
work for Base (by throwing an exception, I know, gross, but it works).
I found it useful, and it also just seemed to make sense - does this `any`
that currently holds a Car hold a Vehicle? Yes. Give me a pointer to it.
On Mon, Apr 15, 2024 at 6:45 AM Frederick Virchanza Gotham via
Std-Proposals <std-proposals_at_[hidden]> wrote:
> 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
>
-- Be seeing you, Tony
Received on 2024-04-21 20:44:24