folly::PolyExtends

Used in the definition of a Poly interface to say that the current interface is an extension of a set of zero or more interfaces.

Synopsis

Declared in <folly/Poly.h>

template<class... I>
struct PolyExtends
    : virtual I...

Description

Example:

struct IFoo { template <class Base> struct Interface : Base { void foo() { folly::poly_call<0>(*this); } }; template <class T> using Members = FOLLY_POLY_MEMBERS(&T::foo); } struct IBar : PolyExtends<IFoo> { template <class Base> struct Interface : Base { void bar(int i) { folly::poly_call<0>(*this, i); } }; template <class T> using Members = FOLLY_POLY_MEMBERS(&T::bar); }

Base Classes

NameDescription
I...

Types

NameDescription
Interface The interface mixin inherited by extending interfaces.

Type Aliases

NameDescription
Members The (empty) member list contributed by this extension.
Subsumptions The list of interfaces this interface subsumes.

Derived Classes

NameDescription
IBooleanTestable A Poly interface that can be used to make Poly objects contextually convertible to bool (true if and only if non-empty). It also gives Poly objects a unary logical negation operator.
IEqualityComparable A Poly interface for types that are equality comparable.
IMoveOnly A Poly interface for types that are move-only.
INullablePointer A Poly interface that can be used to make Poly objects initializable from nullptr (to create an empty Poly) and equality comparable to nullptr (to test for emptiness).
IRegular A Poly interface for types that are copyable, movable, and equality comparable.
ISemiRegular A Poly interface for types that are copyable and movable.
IStrictlyOrderable A Poly interface for types that are strictly orderable.