A class declaration may include a class-base specification, which defines the direct base class of the class and the interfaces (§13) directly implemented by the class.
class-base:
: class-type
: interface-type-list
: class-type , interface-type-list
interface-type-list:
interface-type
interface-type-list , interface-type
The base class specified in a class declaration can be a constructed class type (§4.4). A base class cannot be a type parameter on its own, though it can involve the type parameters that are in scope.
class Extend: V {} // Error, type parameter used as base class
Do'stlaringiz bilan baham: |