Skip to content

Commit

Permalink
Merge pull request #402 from alanb-sony/patch-1
Browse files Browse the repository at this point in the history
Workaround GCC 10&11 optimiser compilation failure
  • Loading branch information
jonathan-r-thorpe authored Aug 1, 2024
2 parents f4c676c + 8733cef commit 6d64db8
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ jobs:
# ubuntu-14.04 ca-certificates are out of date
git config --global http.sslVerify false
# build and install openssl
curl -OsSk https://openssl.org/source/old/1.1.1/openssl-1.1.1v.tar.gz
curl -OsSkL https://openssl.org/source/old/1.1.1/openssl-1.1.1v.tar.gz
tar xzf openssl-1.1.1v.tar.gz
cd openssl-1.1.1v
./config --prefix=/usr/local/custom-openssl --libdir=lib --openssldir=/etc/ssl
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/src/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,26 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, macos-11, windows-2019]
os: [ubuntu-20.04, macos-12, windows-2019]
install_mdns: [false, true]
use_conan: [true]
force_cpprest_asio: [false]
dns_sd_mode: [multicast, unicast]
enable_authorization: [false, true]
exclude:
# install_mdns is only meaningful on Linux
- os: macos-11
- os: macos-12
enable_authorization: false
- os: windows-2019
enable_authorization: false
- os: ubuntu-20.04
enable_authorization: false
- os: macos-11
- os: macos-12
install_mdns: true
- os: windows-2019
install_mdns: true
# for now, unicast DNS-SD tests are only implemented on Linux
- os: macos-11
- os: macos-12
dns_sd_mode: unicast
- os: windows-2019
dns_sd_mode: unicast
Expand Down Expand Up @@ -160,7 +160,7 @@ jobs:
# ubuntu-14.04 ca-certificates are out of date
git config --global http.sslVerify false
# build and install openssl
curl -OsSk https://openssl.org/source/old/1.1.1/openssl-1.1.1v.tar.gz
curl -OsSkL https://openssl.org/source/old/1.1.1/openssl-1.1.1v.tar.gz
tar xzf openssl-1.1.1v.tar.gz
cd openssl-1.1.1v
./config --prefix=/usr/local/custom-openssl --libdir=lib --openssldir=/etc/ssl
Expand Down Expand Up @@ -205,8 +205,8 @@ jobs:

- name: make badges
run: |
# combine badges from all builds, exclude macos-11
${{ github.workspace }}/Sandbox/make_badges.sh ${{ github.workspace }} ${{ runner.workspace }}/artifacts macos-11_auth macos-11_noauth
# combine badges from all builds, exclude macos-12
${{ github.workspace }}/Sandbox/make_badges.sh ${{ github.workspace }} ${{ runner.workspace }}/artifacts macos-12_auth macos-12_noauth
# force push to github onto an orphan 'badges' branch
cd ${{ github.workspace }}
Expand Down
28 changes: 16 additions & 12 deletions Development/cpprest/json_ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,7 @@ namespace web
return !(lhs == rhs);
}

inline bool operator<(const web::json::object& lhs, const web::json::object& rhs)
{
using std::begin;
using std::end;
return std::lexicographical_compare(begin(lhs), end(lhs), begin(rhs), end(rhs));
}
inline bool operator<(const web::json::object& lhs, const web::json::object& rhs);

inline bool operator>(const web::json::object& lhs, const web::json::object& rhs)
{
Expand Down Expand Up @@ -87,12 +82,7 @@ namespace web
return !(lhs == rhs);
}

inline bool operator<(const web::json::array& lhs, const web::json::array& rhs)
{
using std::begin;
using std::end;
return std::lexicographical_compare(begin(lhs), end(lhs), begin(rhs), end(rhs));
}
inline bool operator<(const web::json::array& lhs, const web::json::array& rhs);

inline bool operator>(const web::json::array& lhs, const web::json::array& rhs)
{
Expand Down Expand Up @@ -142,6 +132,20 @@ namespace web
{
return !(lhs < rhs);
}

inline bool operator<(const web::json::array& lhs, const web::json::array& rhs)
{
using std::begin;
using std::end;
return std::lexicographical_compare(begin(lhs), end(lhs), begin(rhs), end(rhs));
}

inline bool operator<(const web::json::object& lhs, const web::json::object& rhs)
{
using std::begin;
using std::end;
return std::lexicographical_compare(begin(lhs), end(lhs), begin(rhs), end(rhs));
}
}
}

Expand Down

0 comments on commit 6d64db8

Please sign in to comment.