Skip to content

Incomplete fix for CWG 3049 #32

@phalpern

Description

@phalpern

The following code fails:

struct C trivially_relocatable_if_eligible {
  ~C() = delete;
};

struct D : C
{
};

static_assert(std::is_trivially_relocatable_v<C>);
static_assert(std::is_trivially_relocatable_v<D>);

Although this is correct according to literal reading of the proposed resolution to CWG 3049, in private discussions, it was decided that a deleted destructor should not prevent class that is annotated with trivially_relocatable_if_eligible from being TR. In effect, the last bullet of 11.2/p3, "-- has a deleted destructor," should be removed from the CD.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions