Skip to content

Commit 359fbc2

Browse files
authored
Merge pull request #2390 from mitza-oci/cxx20
Updates for Visual C++ CI and C++20 compatibility
2 parents 36cf075 + b6865fb commit 359fbc2

3 files changed

Lines changed: 26 additions & 41 deletions

File tree

.github/workflows/cmake.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ jobs:
2424
CXX: g++-12
2525
PackageDeps: g++-12
2626
os: ubuntu-22.04
27-
- CC: vs2019
28-
CXX: vs2019
29-
os: windows-2019
27+
- CC: vs2022
28+
CXX: vs2022
29+
os: windows-2022
3030
runs-on: ${{ matrix.os }}
3131
name: ${{ matrix.os }} ${{ matrix.CXX }}
3232
env:

.github/workflows/windows.yml

Lines changed: 16 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -17,59 +17,42 @@ jobs:
1717
fail-fast: false
1818
matrix:
1919
include:
20-
- name: VS2019WChar
21-
vmimage: windows-2019
22-
mpctype: vs2019
20+
- name: VS2022WChar
21+
vmimage: windows-2022
22+
mpctype: vs2022
2323
BuildPlatform: x64
2424
BuildConfiguration: Debug
2525
vcpkgarch: x64-windows
2626
vcpkglibdir: debug/lib
2727
vcpkgpackages: '"openssl", {"name": "xerces-c", "features": ["xmlch-wchar"]}, "zlib"'
2828
OptionalFeatures: uses_wchar=1
29-
- name: VS2019Debug64
30-
vmimage: windows-2019
31-
mpctype: vs2019
32-
BuildPlatform: x64
33-
BuildConfiguration: Debug
34-
vcpkgarch: x64-windows
35-
vcpkglibdir: debug/lib
36-
vcpkgpackages: '"openssl", "xerces-c", "zlib"'
37-
- name: VS2019Release64
38-
vmimage: windows-2019
39-
mpctype: vs2019
40-
BuildPlatform: x64
41-
BuildConfiguration: Release
42-
vcpkgarch: x64-windows
43-
vcpkglibdir: lib
44-
vcpkgpackages: '"openssl", "xerces-c", "zlib"'
45-
- name: VS2019Debug32
46-
vmimage: windows-2019
47-
mpctype: vs2019
29+
- name: VS2022Debug32
30+
vmimage: windows-2022
31+
mpctype: vs2022
4832
BuildPlatform: Win32
4933
BuildConfiguration: Debug
5034
vcpkgarch: x86-windows
5135
vcpkglibdir: debug/lib
5236
vcpkgpackages: '"openssl", "xerces-c", "zlib"'
53-
- name: VS2019Release32
54-
vmimage: windows-2019
55-
mpctype: vs2019
37+
- name: VS2022Release32
38+
vmimage: windows-2022
39+
mpctype: vs2022
5640
BuildPlatform: Win32
5741
BuildConfiguration: Release
5842
vcpkgarch: x86-windows
5943
vcpkglibdir: lib
6044
vcpkgpackages: '"openssl", "xerces-c", "zlib"'
61-
- name: VS2019Debug64Cxx17
62-
vmimage: windows-2019
63-
mpctype: vs2019
45+
- name: VS2022Debug64Cxx17
46+
vmimage: windows-2022
47+
mpctype: vs2022
6448
BuildPlatform: x64
6549
BuildConfiguration: Debug
6650
vcpkgarch: x64-windows
6751
vcpkglibdir: debug/lib
6852
vcpkgpackages: '"openssl", "xerces-c", "zlib"'
69-
OptionalMpcArgs: -value_template LanguageStandard=stdcpp17
70-
- name: VS2019Debug64Cxx20
71-
vmimage: windows-2019
72-
mpctype: vs2019
53+
- name: VS2022Debug64Cxx20
54+
vmimage: windows-2022
55+
mpctype: vs2022
7356
BuildPlatform: x64
7457
BuildConfiguration: Debug
7558
vcpkgarch: x64-windows
@@ -172,7 +155,7 @@ jobs:
172155
- name: Build solution TAO/tests/IDL_Test/IDL_Test.sln
173156
run: msbuild -maxcpucount -p:Platform=${{ matrix.BuildPlatform }} -p:Configuration=${{ matrix.BuildConfiguration }} TAO/tests/IDL_Test/IDL_Test.sln
174157
mingw:
175-
runs-on: windows-2019
158+
runs-on: windows-2022
176159
strategy:
177160
fail-fast: false
178161
matrix:

TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Endpoint.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,13 @@ TAO_SSLIOP_Endpoint::is_equivalent (const TAO_Endpoint *other_endpoint)
149149
|| this->qop_ != endpoint->qop ()
150150
|| this->trust_.trust_in_target != t.trust_in_target
151151
|| this->trust_.trust_in_client != t.trust_in_client
152-
|| (!CORBA::is_nil (this->credentials_.in ())
153-
&& !(*this->credentials_.in () == *endpoint->credentials ())))
154-
{
155-
return 0;
156-
}
152+
|| (!CORBA::is_nil (this->credentials_.in ()) && endpoint->credentials ()
153+
&& !(*this->credentials_.in () == *static_cast<TAO::SSLIOP_Credentials const*> (endpoint->credentials ()))))
154+
// The cast above is needed for some C++20 compilers since overload resolution can consider b == a for a == b,
155+
// and apparently the derived-to-base and adding-const implicit conversions result in an ambiguity.
156+
{
157+
return false;
158+
}
157159

158160
// Comparing the underlying iiop endpoints is wrong, as their port
159161
// numbers often may not make sense. Or may not being used anyway.

0 commit comments

Comments
 (0)