Skip to content

Pybind11 build failed on MSVC + std:c++latest on windows #1601

Closed
@QuellaZhang

Description

@QuellaZhang

Pybind11 failed when build with std:c++latest by msvc on Windows, I use latest version 978d439 on master branch. Could you please help take a look at this?

You can repro this issue as the steps below:

  1. git clone https://github.com/pybind/pybind11 D:\Pybind11\src
  2. open a VS 2017 amd64 command prompt as admin and browse to D:\Pybind11
  3. set CL=/std:c++latest
  4. cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_SYSTEM_VERSION=10.0.17134.0 ..\src\

Failures:
================================== FAILURES ===================================
______________________________ test_string_view _______________________________

     capture = <conftest.Capture object at 0x00000000051CE470>
     
         @pytest.mark.skipif(not hasattr(m, "has_string_view"), reason="no <string_view>")
         def test_string_view(capture):
             """Tests support for C++17 string_view arguments and return values"""
             assert m.string_view_chars("Hi") == [72, 105]
             assert m.string_view_chars("Hi 🎂") == [72, 105, 32, 0xf0, 0x9f, 0x8e, 0x82]
     >       assert m.string_view16_chars("Hi 🎂") == [72, 105, 32, 0xd83c, 0xdf82]
     E       TypeError: string_view16_chars(): incompatible function arguments. The following argument types are supported:
     E           1. (arg0: unicode) -> list
     E       
     E       Invoked with: 'Hi \xf0\x9f\x8e\x82'
     
     test_builtin_casters.py:117: TypeError

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions