Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xmath.hpp, x*values.cpp: avoid exporting constants #3622

Open
AlexGuteniev opened this issue Apr 4, 2023 · 2 comments
Open

xmath.hpp, x*values.cpp: avoid exporting constants #3622

AlexGuteniev opened this issue Apr 4, 2023 · 2 comments
Labels
enhancement Something can be improved vNext Breaks binary compatibility

Comments

@AlexGuteniev
Copy link
Contributor

There are floating point DLL-exported constants that should be audited: removed if unused, otherwise changed to constant expressions

STL/stl/src/xmath.hpp

Lines 69 to 73 in 9231abe

extern _CRTIMP2_PURE _Dconst _Denorm;
extern _CRTIMP2_PURE _Dconst _Hugeval;
extern _CRTIMP2_PURE _Dconst _Inf;
extern _CRTIMP2_PURE _Dconst _Nan;
extern _CRTIMP2_PURE _Dconst _Snan;

STL/stl/src/xmath.hpp

Lines 77 to 85 in 9231abe

extern _CRTIMP2_PURE _Dconst _FDenorm;
extern _CRTIMP2_PURE _Dconst _FInf;
extern _CRTIMP2_PURE _Dconst _FNan;
extern _CRTIMP2_PURE _Dconst _FSnan;
extern _CRTIMP2_PURE _Dconst _LDenorm;
extern _CRTIMP2_PURE _Dconst _LInf;
extern _CRTIMP2_PURE _Dconst _LNan;
extern _CRTIMP2_PURE _Dconst _LSnan;

STL/stl/src/xmath.hpp

Lines 113 to 115 in 9231abe

extern const _Dconst _Eps;
extern const _Dconst _Rteps;
extern const double _Xbig;

STL/stl/src/xmath.hpp

Lines 142 to 144 in 9231abe

extern const _Dconst _FEps;
extern const _Dconst _FRteps;
extern const float _FXbig;

STL/stl/src/xmath.hpp

Lines 170 to 172 in 9231abe

extern const _Dconst _LEps;
extern const _Dconst _LRteps;
extern const long double _LXbig;

vNext note: Resolving this issue will require breaking binary compatibility. We won't be able to accept pull requests for this issue until the vNext branch is available. See #169 for more information.

@frederick-vs-ja
Copy link
Contributor

Some internal functions are no longer used and not DLL-exported. Can we drop them right now?

@StephanTLavavej StephanTLavavej added enhancement Something can be improved vNext Breaks binary compatibility labels Apr 4, 2023
@StephanTLavavej
Copy link
Member

@frederick-vs-ja Yes, but you have to be very careful about searching for usage. Some of them are cleverly macroized for float/double/long double variants, so the identifiers appear to be unused at first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Something can be improved vNext Breaks binary compatibility
Projects
None yet
Development

No branches or pull requests

3 participants