https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80939

            Bug ID: 80939
           Summary: Various helper function templates in <variant>
                    incorrectly marked constexpr
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rs2740 at gmail dot com
  Target Milestone: ---

No specialization of the following helper function templates can meet the
constexpr function requirements, and therefore they should not be marked
constexpr:

__erased_ctor (contains a new-expression)
__erased_dtor (evaluates either a pseudodestructor call or an actual destructor
call, which is a call to a non-constexpr function)

The following are technically valid - because __ref_cast is subject to ADL -
but in reality can never be constexpr anyway and so probably shouldn't be
marked constexpr:

__erased_assign
__erased_swap
__erased_hash

Reply via email to