Skip to content

[meta.type.synop] (and other) Repetitive 'inline constexpr'? #4601

@jhunterkohler

Description

@jhunterkohler

As can be seen in [meta.type.synop], there is constant use of inline constexpr. This is likely not limited just to this area of the text.

Example:

draft/source/utilities.tex

Lines 16155 to 16160 in 51c8df6

template<class T>
inline constexpr bool @\libglobal{is_void_v}@ = is_void<T>::value;
template<class T>
inline constexpr bool @\libglobal{is_null_pointer_v}@ = is_null_pointer<T>::value;
template<class T>
inline constexpr bool @\libglobal{is_integral_v}@ = is_integral<T>::value;

I had previously believed constexpr is implicitly inline for static data members, as specified in [dcl.constexpr]:

A function or static data member
declared with the \tcode{constexpr} or \tcode{consteval} specifier
is implicitly an inline function or variable\iref{dcl.inline}.

Is inline constexpr used for clarity of the text?

I'll assume that this is not a mistake, so please let me know the reasoning. Alternatively, if it's not useful to have inline constexpr here, I can remove it and submit a pull request.

Thanks for your time!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions