Skip to content

Commit 4b68d03

Browse files
Build with OLP_SDK_NO_EXCEPTION=ON using clang
It appeared that Clang and GCC complains on different lines at least in case of Boost codebase Relates-To: MINOR Signed-off-by: Rustam Gamidov <ext-rustam.gamidov@here.com>
1 parent 4b553db commit 4b68d03

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

.github/workflows/psv_pipelines.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,14 +174,14 @@ jobs:
174174
shell: bash
175175

176176
psv-linux-22-04-clang-hidden-build:
177-
name: PSV.Linux.22.04.clang.hidden
177+
name: PSV.Linux.22.04.clang.hidden.OLP_SDK_NO_EXCEPTION=ON
178178
runs-on: ubuntu-22.04
179179
env:
180180
BUILD_TYPE: RelWithDebInfo
181181
CC: clang-11
182182
CXX: clang++-11
183183
CXXFLAGS: -Wno-deprecated-copy
184-
EXTRA_CMAKE_OPTIONS: -DCMAKE_CXX_VISIBILITY_PRESET=hidden -DOLP_SDK_ENABLE_TESTING=OFF
184+
EXTRA_CMAKE_OPTIONS: -DCMAKE_CXX_VISIBILITY_PRESET=hidden -DOLP_SDK_ENABLE_TESTING=OFF -DOLP_SDK_NO_EXCEPTION=ON
185185
steps:
186186
- name: Check out repository
187187
uses: actions/checkout@v4

external/boost/boost_182_json_noexceptions.diff

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,29 @@
1+
diff --git a/libs/json/include/boost/json/detail/value_to.hpp b/libs/json/include/boost/json/detail/value_to.hpp
2+
index 7cb779e..6df1c9d 100644
3+
--- a/libs/json/include/boost/json/detail/value_to.hpp
4+
+++ b/libs/json/include/boost/json/detail/value_to.hpp
5+
@@ -652,10 +652,13 @@ value_to_impl(
6+
value const& jv,
7+
user_conversion_tag)
8+
{
9+
+#ifndef BOOST_NO_EXCEPTIONS
10+
try
11+
{
12+
+#endif // BOOST_NO_EXCEPTIONS
13+
return {
14+
boost::system::in_place_value, tag_invoke(value_to_tag<T>(), jv)};
15+
+#ifndef BOOST_NO_EXCEPTIONS
16+
}
17+
catch( std::bad_alloc const&)
18+
{
19+
@@ -671,6 +674,7 @@ value_to_impl(
20+
BOOST_JSON_FAIL(ec, error::exception);
21+
return {boost::system::in_place_error, ec};
22+
}
23+
+#endif // BOOST_NO_EXCEPTIONS
24+
}
25+
26+
// no suitable conversion implementation
127
diff --git a/libs/json/include/boost/json/impl/value.ipp b/libs/json/include/boost/json/impl/value.ipp
228
index 7460c02..7513b38 100644
329
--- a/libs/json/include/boost/json/impl/value.ipp

0 commit comments

Comments
 (0)