Skip to content

Commit d379c08

Browse files
Fix btree issue in map tests.
Without any weak ordering, btree_map fails to compile on windows 2022. Closes #12289 PiperOrigin-RevId: 527019995
1 parent 09a8d61 commit d379c08

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

.github/workflows/test_cpp.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,18 +232,28 @@ jobs:
232232
-G Ninja -Dprotobuf_WITH_ZLIB=OFF -Dprotobuf_BUILD_CONFORMANCE=OFF
233233
-Dprotobuf_BUILD_SHARED_LIBS=OFF
234234
-Dprotobuf_BUILD_EXAMPLES=ON
235+
vsversion: '2019'
236+
- name: Windows CMake 2022
237+
os: windows-2022
238+
flags: >-
239+
-G Ninja -Dprotobuf_WITH_ZLIB=OFF -Dprotobuf_BUILD_CONFORMANCE=OFF
240+
-Dprotobuf_BUILD_SHARED_LIBS=OFF
241+
-Dprotobuf_BUILD_EXAMPLES=ON
242+
vsversion: '2022'
235243
- name: Windows CMake Shared
236244
os: windows-2019
237245
flags: >-
238246
-G Ninja -Dprotobuf_WITH_ZLIB=OFF -Dprotobuf_BUILD_CONFORMANCE=OFF
239247
-Dprotobuf_BUILD_SHARED_LIBS=ON
248+
vsversion: '2019'
240249
- name: Windows CMake Install
241250
os: windows-2019
242251
install-flags: -G Ninja -Dprotobuf_WITH_ZLIB=OFF -Dprotobuf_BUILD_CONFORMANCE=OFF -Dprotobuf_BUILD_TESTS=OFF
243252
flags: >-
244253
-G Ninja -Dprotobuf_WITH_ZLIB=OFF -Dprotobuf_BUILD_CONFORMANCE=OFF
245254
-Dprotobuf_REMOVE_INSTALLED_HEADERS=ON
246255
-Dprotobuf_BUILD_PROTOBUF_BINARIES=OFF
256+
vsversion: '2019'
247257
name: ${{ matrix.name }}
248258
runs-on: ${{ matrix.os }}
249259
steps:
@@ -257,6 +267,7 @@ jobs:
257267
uses: ./.github/actions/ccache
258268
with:
259269
cache-prefix: ${{ matrix.name }}
270+
vsversion: ${{ matrix.vsversion }}
260271

261272
# Install phase.
262273
- name: Configure CMake for install

src/google/protobuf/map_test.inc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ struct ConstructorTag {
129129
ConstructorTag(ConstructorTag&&)
130130
: invoked_constructor(ConstructorType::kMove) {}
131131

132+
bool operator<(const ConstructorTag&) const { return false; }
133+
132134
ConstructorType invoked_constructor;
133135
};
134136

0 commit comments

Comments
 (0)