Title
Mark constexpr global variables as inline
Status
resolved
Section
[utilities][execpol]
Submitter
Great Britain

Created on 2017-02-03.00:00:00 last changed 85 months ago

Messages

Date: 2017-03-15.00:00:00

[ 2017-03-12, post-Kona ]

Resolved by p0607r0.

Date: 2017-02-15.00:00:00

[ 2017-02-25, Daniel comments ]

There will be the paper p0607r0 provided for the Kona meeting that solves this issue.

Date: 2017-02-15.00:00:00

[ 2017-02-03, Marshall notes ]

See also FI 9 (LWG 2888).

Date: 2017-02-03.00:00:00
Addresses GB 28

The C++ standard library provides many constexpr global variables. These all create the risk of ODR violations for innocent user code. This is especially bad for the new ExecutionPolicy algorithms, since their constants are always passed by reference, so any use of those algorithms from an inline function results in an ODR violation.

This can be avoided by marking the globals as inline.

Proposed change: Add inline specifier to: bind placeholders _1, _2, ..., nullopt, piecewise_construct, allocator_arg, ignore, seq, par, par_unseq in <execution>

History
Date User Action Args
2017-03-12 23:04:12adminsetmessages: + msg9084
2017-03-12 23:04:12adminsetstatus: new -> resolved
2017-02-26 15:11:54adminsetmessages: + msg9001
2017-02-04 01:16:32adminsetmessages: + msg8878
2017-02-03 00:00:00admincreate