This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of New status.

2827. is_trivially_constructible and non-trivial destructors

Section: [meta.unary.prop] Status: New Submitter: Richard Smith Opened: 2016-11-17 Last modified: 2017-02-02

Priority: 3

View other active issues in [meta.unary.prop].

View all other issues in [meta.unary.prop].

View all issues with New status.


struct S 
  ~S(); // non-trivial

static_assert(std::is_trivially_constructible<S>::value, "");

Should the assert pass? Implementations disagree.

Per [meta.unary.prop]'s Table 38, this trait looks at whether the following variable definition is known to call no operation that is not trivial:

S t(create<Args>()...);

... where Args is an empty pack in this case. That variable definition results in a call to the S destructor. Should that call be considered by the trait?

[2017-01-27 Telecon]

Priority 3

This issue interacts with 2116

Proposed resolution: