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

Inline cause compile error on MSVC 2013 or earlier #33

Open
PerMagnusH opened this issue May 23, 2020 · 6 comments
Open

Inline cause compile error on MSVC 2013 or earlier #33

PerMagnusH opened this issue May 23, 2020 · 6 comments

Comments

@PerMagnusH
Copy link

Hi when compiling with MSVC (VS2013 or earlier) the inline keyword is not supported. Is it possible for you to add a #define inline __inline for MSVC?

@mischasan
Copy link
Owner

mischasan commented May 25, 2020

Sure. I'm in a time crunch this week (yes, even for an apparent 3line change in acism.h)
which will amount to:

#ifdef _MSC_VER
#  define inline __inline
#endif//_MSC_VER

Given that only tiny static routines, defining inline as empty may work just as well.
I recall VS2013 ignored almost all inline anyway, unless you went for __forceinline . Sigh.

@mischasan
Copy link
Owner

Change committed as shown; not tested.

@PerMagnusH
Copy link
Author

PerMagnusH commented Jul 4, 2020 via email

@changnet
Copy link

changnet commented Jan 15, 2021

newer version Visual Studio(or c++ complier in VS2013) compiling fail since they already have inline keyword defined.
error C1189: The C++ Standard Library forbids macroizing keywords ...
inline: macro redefinition

@mischasan
Copy link
Owner

Quick fix: insert #undef inline before the #define inline. Will update repo asap

@mischasan
Copy link
Owner

mischasan commented Feb 21, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants