C++ Logo


Advanced search

Re: Conditional final class-virt-specifier

From: Jason McKesson <jmckesson_at_[hidden]>
Date: Sat, 11 Jul 2020 12:06:11 -0400
I just realized something else with your examples:

class extension final<class B>(B::api_version < extension::api_version)

Not only does checking the validity of `final` have to be deferred
until the hypothetical derived class gets a full definition, the
validity of the *expression* in `final` is dependent on `extension`
*itself* being fully defined. So the compiler can't even really
compile the expression itself until after the class's definition.

Received on 2020-07-11 11:09:36