Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Polymorphic (abstract) variants

33 views
Skip to first unread message

Mr Flibble

unread,
Nov 16, 2019, 7:00:34 PM11/16/19
to
Hi!

The neoGFX C++ support library "neolib" now features polymorphic variants
which work with std::visit!

A polymorphic variant is a variant of types that have abstract interfaces
and the variant itself also has an abstract interface allowing variants to
be used across a plug-in boundary (plug-ins are similar to Microsoft's COM
DLLs).

https://github.com/i42output/neolib/blob/master/include/neolib/i_plugin_variant.hpp
https://github.com/i42output/neolib/blob/master/include/neolib/plugin_variant.hpp

/Flibble

--
"Snakes didn't evolve, instead talking snakes with legs changed into
snakes." - Rick C. Hodgin

“You won’t burn in hell. But be nice anyway.” – Ricky Gervais

“I see Atheists are fighting and killing each other again, over who
doesn’t believe in any God the most. Oh, no..wait.. that never happens.” –
Ricky Gervais

"Suppose it's all true, and you walk up to the pearly gates, and are
confronted by God," Bryne asked on his show The Meaning of Life. "What
will Stephen Fry say to him, her, or it?"
"I'd say, bone cancer in children? What's that about?" Fry replied.
"How dare you? How dare you create a world to which there is such misery
that is not our fault. It's not right, it's utterly, utterly evil."
"Why should I respect a capricious, mean-minded, stupid God who creates a
world that is so full of injustice and pain. That's what I would say."

Alf P. Steinbach

unread,
Nov 16, 2019, 7:18:15 PM11/16/19
to
On 17.11.2019 01:00, Mr Flibble wrote:
> Hi!
>
> The neoGFX C++ support library "neolib" now features polymorphic
> variants which work with std::visit!
>
> A polymorphic variant is a variant of types that have abstract
> interfaces and the variant itself also has an abstract interface
> allowing variants to be used across a plug-in boundary (plug-ins are
> similar to Microsoft's COM DLLs).
>
> https://github.com/i42output/neolib/blob/master/include/neolib/i_plugin_variant.hpp
>
> https://github.com/i42output/neolib/blob/master/include/neolib/plugin_variant.hpp

Polymorphic variants are nice.

Is it possible to sort of factor that out of neoGFX?

- Alf

Mr Flibble

unread,
Nov 16, 2019, 7:22:18 PM11/16/19
to
Hi Alf,

neolib is an independent project with no neoGFX dependencies; unlike
neoGFX it also has a permissive licence.

/Flibble

--
"Snakes didn't evolve, instead talking snakes with legs changed into
snakes." - Rick C. Hodgin

“You won’t burn in hell. But be nice anyway.” – Ricky Gervais

“I see Atheists are fighting and killing each other again, over who
doesn’t believe in any God the most. Oh, no..wait.. that never happens.” –
Ricky Gervais

"Suppose it's all true, and you walk up to the pearly gates, and are
confronted by God," Byrne asked on his show The Meaning of Life. "What
0 new messages