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

Fix DLL visibility of explicit instantiation "declaration" of internal::basic_data<void> in header format.h and the explicit instantiation "definition" in format.cc #1134

Merged
merged 8 commits into from
May 2, 2019

Commits on Apr 28, 2019

  1. Update format.cc

    As the explicit instantiation *declaration* of `internal::basic_data<void>` in format.h, this explicit instantiation *definition* should mirror FMT_API also.
    denchat authored Apr 28, 2019
    Configuration menu
    Copy the full SHA
    01bb881 View commit details
    Browse the repository at this point in the history

Commits on Apr 29, 2019

  1. Mirror visibility of explicit instantiation declaration

    explicit instantiation declaration of internal::basic_data<void> should mirror visibility of FMT_API
    denchat authored Apr 29, 2019
    Configuration menu
    Copy the full SHA
    3944deb View commit details
    Browse the repository at this point in the history

Commits on Apr 30, 2019

  1. Eliminate __declspec(dllexport) designation on extern template inte…

    …rnal::basic_data<> when `extern` affected during exporting phase.
    denchat authored Apr 30, 2019
    Configuration menu
    Copy the full SHA
    e4bd8c1 View commit details
    Browse the repository at this point in the history

Commits on May 2, 2019

  1. Add FMT_EXTERN_TEMPLATE_API for designate DLL export extern template

    When exporting DLL, do not designate `__declspec(dllexport)` any template that has any explicit class template declaration a.k.a. `extern template`. Instead, designate `__declspec(dllexport)` at single point where we have explicit class template definition a.k.a. normal instantiation without `extern`
    
    Note: this is a c++11 feature.
    denchat authored May 2, 2019
    Configuration menu
    Copy the full SHA
    4f919b8 View commit details
    Browse the repository at this point in the history
  2. Delete whole FMT_USE_EXTERN_TEMPLATES block and its condition

    1. Remove whole `FMT_USE_EXTERN_TEMPLATES` block
    (trailing `FMT_UDL_TEMPLATE` block)
    ````
    #ifndef FMT_USE_EXTERN_TEMPLATES
    #  ifndef FMT_HEADER_ONLY
    #    define FMT_USE_EXTERN_TEMPLATES                           \
          ((FMT_CLANG_VERSION >= 209 && __cplusplus >= 201103L) || \
           (FMT_GCC_VERSION >= 303 && FMT_HAS_GXX_CXX11))
    #  else
    #    define FMT_USE_EXTERN_TEMPLATES 0
    #  endif
    #endif
    ````
    
    2. Delete `FMT_USE_EXTERN_TEMPLATES` condition, only condition, that trailing basic_data class template definition.
    ````
    #if FMT_USE_EXTERN_TEMPLATES
    extern template struct basic_data<void>;
    #endif
    ````
    
    3. Replace `FMT_API` with new `FMT_EXTERN_TEMPLATE_API` added in `core.h` for sake of extern template of `basic_data<void>`
    denchat authored May 2, 2019
    Configuration menu
    Copy the full SHA
    c6e6bfe View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b4a4dcd View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7d0dd76 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c3d87c5 View commit details
    Browse the repository at this point in the history