-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Remove <Windows.h> include from headers #573
Comments
to notice : |
Two thumbs up from my side for reducing the use of windows.h in headers... |
Please remove |
We are in the process of internal agreement. Sorry for the delay. |
@Chronial notes in their PR #576 (comment) that this issue is about usability I'll point out that oneTBB is a portable library that provides cross-platform abstractions and interfaces. C++ headers basically define these interfaces. Including Also it's not like oneTBB is a header-only library that does not separate implementation from interface - this request is just along the same lines as what oneTBB has been doing all along. It's simply that one needs to think of |
oneTBB is a mix of header-only and binary-based APIs; many class templates are header-only at least by default (if no tool support is requested via a macro, etc.). Typically these templates, including Therefore, even though the use of One possible solution I can think of is to provide an opt-out macro that precludes the use of |
Probably |
This preprocessor define is certainly helpful. In case someone has this problem, there are even more related macros, see http://web.archive.org/web/20121219084749/http://support.microsoft.com/kb/166474:
However, this does not really solve all the problems that can be caused by including In summary, its always very good to avoid including |
@alexey-katranov is this issue is still relevant? |
The tbb currently includes
Windows.h
inenumerable_thread_specific.h
. Through transitive includes, this also affectscombinable.h
,concurrent_map.h
andconcurrent_set.h
.Since windows.h is massive and declares thousands of symbols, this include has a negative impact on build times. The windows include does not need to be in a public header. We should either:
The text was updated successfully, but these errors were encountered: