Skip to content

Commit e8ee438

Browse files
Build with OLP_SDK_NO_EXCEPTION=ON using clang (#1676)
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 5977067 commit e8ee438

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
@@ -197,14 +197,14 @@ jobs:
197197
shell: bash
198198

199199
psv-linux-22-04-clang-hidden-build:
200-
name: PSV.Linux.22.04.clang.hidden
200+
name: PSV.Linux.22.04.clang.hidden.OLP_SDK_NO_EXCEPTION=ON
201201
runs-on: ubuntu-22.04
202202
env:
203203
BUILD_TYPE: RelWithDebInfo
204204
CC: clang-11
205205
CXX: clang++-11
206206
CXXFLAGS: -Wno-deprecated-copy
207-
EXTRA_CMAKE_OPTIONS: -DCMAKE_CXX_VISIBILITY_PRESET=hidden -DOLP_SDK_ENABLE_TESTING=OFF
207+
EXTRA_CMAKE_OPTIONS: -DCMAKE_CXX_VISIBILITY_PRESET=hidden -DOLP_SDK_ENABLE_TESTING=OFF -DOLP_SDK_NO_EXCEPTION=ON
208208
steps:
209209
- name: Check out repository
210210
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)