Skip to content

Commit

Permalink
Fix btree issue in map tests.
Browse files Browse the repository at this point in the history
Without any weak ordering, btree_map fails to compile on windows 2022.

Closes #12289

PiperOrigin-RevId: 527019995
  • Loading branch information
mkruskal-google authored and copybara-github committed Apr 25, 2023
1 parent 5233990 commit 9898418
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/test_cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -278,18 +278,28 @@ jobs:
-G Ninja -Dprotobuf_WITH_ZLIB=OFF -Dprotobuf_BUILD_CONFORMANCE=OFF
-Dprotobuf_BUILD_SHARED_LIBS=OFF
-Dprotobuf_BUILD_EXAMPLES=ON
vsversion: '2019'
- name: Windows CMake 2022
os: windows-2022
flags: >-
-G Ninja -Dprotobuf_WITH_ZLIB=OFF -Dprotobuf_BUILD_CONFORMANCE=OFF
-Dprotobuf_BUILD_SHARED_LIBS=OFF
-Dprotobuf_BUILD_EXAMPLES=ON
vsversion: '2022'
- name: Windows CMake Shared
os: windows-2019
flags: >-
-G Ninja -Dprotobuf_WITH_ZLIB=OFF -Dprotobuf_BUILD_CONFORMANCE=OFF
-Dprotobuf_BUILD_SHARED_LIBS=ON
vsversion: '2019'
- name: Windows CMake Install
os: windows-2019
install-flags: -G Ninja -Dprotobuf_WITH_ZLIB=OFF -Dprotobuf_BUILD_CONFORMANCE=OFF -Dprotobuf_BUILD_TESTS=OFF
flags: >-
-G Ninja -Dprotobuf_WITH_ZLIB=OFF -Dprotobuf_BUILD_CONFORMANCE=OFF
-Dprotobuf_REMOVE_INSTALLED_HEADERS=ON
-Dprotobuf_BUILD_PROTOBUF_BINARIES=OFF
vsversion: '2019'
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -305,6 +315,7 @@ jobs:
uses: protocolbuffers/protobuf-ci/ccache@v1
with:
cache-prefix: ${{ matrix.name }}
vsversion: ${{ matrix.vsversion }}

# Install phase.
- name: Configure CMake for install
Expand Down
2 changes: 2 additions & 0 deletions src/google/protobuf/map_test.inc
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ struct ConstructorTag {
ConstructorTag(ConstructorTag&&)
: invoked_constructor(ConstructorType::kMove) {}

bool operator<(const ConstructorTag&) const { return false; }

ConstructorType invoked_constructor;
};

Expand Down

0 comments on commit 9898418

Please sign in to comment.