New issue
Advanced search Search tips

Issue 874482 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature



Sign in to add a comment

clang plugin: exempt constexpr constructors from out-of-line-definition check

Project Member Reported by eseckler@chromium.org, Aug 15

Issue description

Right now, the clang plugin complains when a class is "complex" and its constructor is defined in the header. However, if the constructor is a constexpr constructor, it needs to be defined in the header.

The only way around the chromium-style error seems to be to further declare the constructor as an "inline" constructor, and define it outside the class in the header, see [1] for an example.

I believe a more sensible fix for this would be to exempt constexpr constructors from the clang plugin rule.

[1] https://chromium-review.googlesource.com/c/chromium/src/+/1169179/22/base/task/task_traits_extension.h
 

Sign in to add a comment