Skip to content

Commit

Permalink
Fix strip_boost_namespace.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
denzor200 committed Aug 12, 2023
1 parent 196aeb6 commit 50c9d6f
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
fail-fast: false
matrix:
include:
- toolset: gcc-12
- toolset: gcc-12 # Do not remove! It is the only toolset that tests misc/strip_boost_namespace.sh
cxxstd: "03,11,14,17,2a"
os: ubuntu-22.04
cxxflags: "cxxflags=--coverage -fsanitize=address,leak,undefined -fno-sanitize-recover=undefined"
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:
dist/bin/inspect libs/$LIBRARY
- name: Test boost namespace stripping
if: ${{matrix.toolset == 'gcc-9'}}
if: ${{matrix.toolset == 'gcc-12'}}
run: ../boost-root/libs/$LIBRARY/misc/strip_boost_namespace.sh

- name: Prepare coverage data
Expand Down
2 changes: 1 addition & 1 deletion include/boost/pfr/core_name.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ constexpr auto names_as_array() noexcept {
}


}}
}} // namespace boost::pfr

#endif // BOOST_PFR_CORE_NAME_HPP

2 changes: 1 addition & 1 deletion include/boost/pfr/detail/core_name14_disabled.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ constexpr auto tie_as_names_tuple() noexcept {
return detail::make_sequence_tuple();
}

}}}
}}} // namespace boost::pfr::detail

#endif // BOOST_PFR_DETAIL_CORE_NAME14_DISABLED_HPP

2 changes: 1 addition & 1 deletion include/boost/pfr/detail/core_name20_static.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ constexpr auto tie_as_names_tuple() noexcept {
return tie_as_names_tuple_impl<T>(detail::make_index_sequence<detail::fields_count<T>()>{});
}

}}}
}}} // namespace boost::pfr::detail

#endif // BOOST_PFR_DETAIL_CORE_NAME20_STATIC_HPP

2 changes: 1 addition & 1 deletion include/boost/pfr/detail/stdarray.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ constexpr auto make_stdarray_from_tietuple(const T& t, std::index_sequence<I...>
);
}

}}}
}}} // namespace boost::pfr::detail

#endif // BOOST_PFR_DETAIL_STDARRAY_HPP

12 changes: 9 additions & 3 deletions misc/strip_boost_namespace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,26 @@ find ${TARGET_PATH}/doc -type f | xargs sed -i 's|Boost.PFR|PFR|g'
sed -i 's|# \[Boost.PFR\](https://boost.org/libs/pfr)|# [PFR](https://apolukhin.github.io/pfr_non_boost/)|g' ${TARGET_PATH}/README.md

echo -n "***** Testing: "
if g++-9 -std=c++17 -DPFR_USE_LOOPHOLE=0 -DPFR_USE_CPP17=1 -I ${TARGET_PATH}/include/ ${TARGET_PATH}/example/motivating_example0.cpp && ./a.out > /dev/null; then
if g++-12 -std=c++2a -DPFR_USE_LOOPHOLE=0 -DPFR_USE_CPP17=1 -DPFR_ENABLE_GETTING_NAMES=1 -I ${TARGET_PATH}/include/ ${TARGET_PATH}/example/motivating_example0.cpp && ./a.out > /dev/null; then
echo -n "OK"
else
echo -n "FAIL"
exit 2
fi
if g++-9 -std=c++17 -DPFR_USE_LOOPHOLE=1 -DPFR_USE_CPP17=0 -I ${TARGET_PATH}/include/ ${TARGET_PATH}/example/motivating_example0.cpp && ./a.out > /dev/null; then
if g++-12 -std=c++2a -DPFR_USE_LOOPHOLE=0 -DPFR_USE_CPP17=1 -DPFR_ENABLE_GETTING_NAMES=0 -I ${TARGET_PATH}/include/ ${TARGET_PATH}/example/motivating_example0.cpp && ./a.out > /dev/null; then
echo -n "OK"
else
echo -n "FAIL"
exit 2
fi
if g++-12 -std=c++2a -DPFR_USE_LOOPHOLE=1 -DPFR_USE_CPP17=0 -I ${TARGET_PATH}/include/ ${TARGET_PATH}/example/motivating_example0.cpp && ./a.out > /dev/null; then
echo -n ", OK"
else
echo -n ", FAIL"
exit 3
fi

if g++-9 -std=c++17 -DPFR_USE_LOOPHOLE=0 -DPFR_USE_CPP17=0 -I ${TARGET_PATH}/include/ ${TARGET_PATH}/example/get.cpp && ./a.out > /dev/null; then
if g++-12 -std=c++2a -DPFR_USE_LOOPHOLE=0 -DPFR_USE_CPP17=0 -I ${TARGET_PATH}/include/ ${TARGET_PATH}/example/get.cpp && ./a.out > /dev/null; then
echo -e ", OK"
else
echo -e ", FAIL"
Expand Down

0 comments on commit 50c9d6f

Please sign in to comment.