boostorg / boostorg/math

Issues with building Boost.Math into a standard library implementation

Offen
#1,186 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
C++
Sterne
374
Forks
264
Ø Merge
1 T. 23 Std.
Gemergte PRs (30 T.)
17

Beschreibung

Currently MSVC STL builds Boost.Math into its static library, which cause the static library contains non-_Uglified linking symbols and causes non-conforming linking behavior. See microsoft/STL#362.

I'm trying to resolve this in Boost.Math by adding the `BOOST_MATH_NAMESPACE` macro
```C++
#ifndef BOOST_MATH_NAMESPACE
#define BOOST_MATH_NAMESPACE math
#endif
```
and then replace every occurrence of `math` which is a namespace with `BOOST_MATH_NAMESPACE`.

With the changes above, MSVC STL's [`special_math.cpp`](https://github.com/microsoft/STL/blob/62205ab155d093e71dd9588a78f02c5396c3c14b/stl/src/special_math.cpp) can define `BOOST_MATH_NAMESPACE` as `_Math` (or some other _Uglified identifier, e.g. `__math__`) before including `` and then use `::boost::BOOST_MATH_NAMESPACE::*` to get rid of non-_Uglified symbols.

But the changes need to touch 500+ files in Boost.Math and make maintenance a bit harder (every namespace `math` should be spelt as `BOOST_MATH_NAMESPACE` later). Not sure whether this approach is OK.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.