Skip to content

Conversation

@trflynn89
Copy link
Owner

@trflynn89 trflynn89 commented Nov 28, 2020

  1. Add /permissive flag to MSVC unit test compilation. As of 16.8, MSVC
    implicitly adds /permissive- when using /std:c++latest. See:

    https://docs.microsoft.com/en-us/cpp/build/reference/permissive-standards-conformance?view=msvc-160

    It seems that with this flag, MSVC fails to compile user-defined
    literals when prefixed with a negative sign, e.g. "-100_u8".

  2. MSVC previously respected a stream's precision using std::hexfloat,
    which is non-compliant with the spec (std::hexfloat is meant to
    ignore precision). Unfortunately it does not behave the same as Clang
    and GCC still; MSVC will always zero-pad a fixed amount. See:

    Fix ostream << floating_point not correctly handling precision microsoft/STL#1173

@codecov
Copy link

codecov bot commented Nov 28, 2020

Codecov Report

Merging #231 (3e79be7) into master (65a95dc) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #231   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           80        80           
  Lines         3543      3543           
=========================================
  Hits          3543      3543           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 65a95dc...3e79be7. Read the comment docs.

1. Add /permissive flag to MSVC unit test compilation. As of 16.8, MSVC
   implicitly adds /permissive- when using /std:c++latest. See:

   https://docs.microsoft.com/en-us/cpp/build/reference/permissive-standards-conformance?view=msvc-160

   It seems that with this flag, MSVC fails to compile user-defined
   literals when prefixed with a negative sign, e.g. "-100_u8".

2. MSVC previously respected a stream's precision using std::hexfloat,
   which is non-compliant with the spec (std::hexfloat is meant to
   ignore precision). Unfortunately it does not behave the same as Clang
   and GCC still; MSVC will always zero-pad a fixed amount. See:

   microsoft/STL#1173
@trflynn89 trflynn89 changed the title Add /permissive flag to MSVC unit test compilation Fix Windows builds with Visual Studio 16.8 Nov 29, 2020
@trflynn89 trflynn89 merged commit ed87643 into master Nov 29, 2020
@trflynn89 trflynn89 deleted the msvc_16_8 branch November 29, 2020 00:50
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