Skip to content

Conversation

@legends2k
Copy link

  • Include share.h for _SH_DENYNO’s definition
  • Define NOMINMAX only if not already defined; MINGW warns of redefinition since bits/os_defines.h included by <algorithm> already defines it
  • Use C++11 thread_local instead of the non-standard option of __declspec(thread) 1

@legends2k
Copy link
Author

This also fixes #219.

* Include `share.h` for `_SH_DENYNO`’s definition
* Define `NOMINMAX` only if not already defined; MINGW warns of
  redefinition since `bits/os_defines.h` included by `<algorithm>`
  already defines it
* Use C++11 `thread_local` instead of the non-standard option of
  `__declspec(thread)` [1]

[1]: https://learn.microsoft.com/en-us/cpp/cpp/thread?view=msvc-170
@neheb neheb mentioned this pull request Nov 26, 2022
@legends2k
Copy link
Author

legends2k commented Nov 29, 2022

Used thread_local within LOGURU_WINTHREADS macro since both MinGW and MSVC 2015 (7+ years old now) support it.

@emilk Please let me know if you've concerns around this.

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

Successfully merging this pull request may close these issues.

2 participants