cgal/STL_Extension
Sebastien Loriot 8978dde2e5
Mark variables declared at global scope in headers as 'inline'. (#8874)
## Summary of Changes

`const` variables declared at global scope have internal linkage, and so
if they are declared in a header file, they are replicated in every file
that `#include` the header. They also can't be the target of `using`
declarations that exports the variable into a C++20 module. This change
marks a number of variables with `inline`, which gives these variables
external linkage, allows the linker to unify all of these variables
between different `.o` files, and also allows for their use in C++20
modules.

There is a separate question whether these variables could or should be
`constexpr` instead of just `const`. The difference between `constexpr`
and `const` has no effect on linkage, and so in the spirit of taking one
step at a time, this patch does not address the `constexpr` vs `const`
question.

This patch fixes #8871. Related to
https://github.com/dealii/dealii/issues/18071.

## Release Management

* Affected package(s): 5.6.1
* Issue(s) solved (if any): #8871
* License and copyright ownership: Same license as used throughout CGAL.
2025-05-16 13:00:02 +02:00
..
benchmark update our CMake version 3.18...3.31 2025-02-04 14:32:37 +01:00
doc/STL_Extension Merge remote-tracking branch 'cgal/master' into Kernel_23-Fix_dangling_ref_in_CC3-GF 2025-03-15 14:09:28 +01:00
examples/STL_Extension update our CMake version 3.18...3.31 2025-02-04 14:32:37 +01:00
include/CGAL Mark variables declared at global scope in headers as 'inline'. (#8874) 2025-05-16 13:00:02 +02:00
package_info/STL_Extension
test/STL_Extension Merge remote-tracking branch 'cgal/5.6.x-branch' into cgal/6.0.x-branch 2025-04-10 18:12:06 +02:00