Add explicit visibility for class and function templates (closes #56) #61
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The current symbol visibility is implemented as follows:
-fvisibility=hidden)_APImacrodefaultvisibilityTemplates are not part of public interface as MSVC can't handle dllexport and dllimport on non-compiled symbols. Thus, we don't define visibility on templates and inline functions on Linux and macOS either and they are hidden by our default setting.
To solve the visibility problem between the compilers MSVC, GCC and clang (considering the platforms Windows, Linux and macOS), I propose the following additional visibility behavior:
_TEMPLATE_APImacro that resolves to default visibility on GCC and clang but to nothing on MSVC