mirror of
https://github.com/boostorg/histogram.git
synced 2026-01-19 16:22:17 +00:00
Don't use deprecated form of user-defined literal operator (#408)
* Don't use deprecated form of user-defined literal operator * add clang warning regarding deprecated literal operator --------- Co-authored-by: Hans Dembinski <hans.dembinski@gmail.com>
This commit is contained in:
committed by
GitHub
parent
b5cce2833b
commit
c55b5290af
5
.github/workflows/slow.yml
vendored
5
.github/workflows/slow.yml
vendored
@@ -85,4 +85,7 @@ jobs:
|
||||
- name: Test cxxstd=17 ubsan asan
|
||||
run: |
|
||||
cd libs/histogram
|
||||
../../b2 $B2_OPTS toolset=clang cxxstd=17 variant=histogram_ubasan test//all
|
||||
|
||||
# workaround: -Wdeprecated-literal-operator only works with clang and not with appleclang
|
||||
# Apparently, build.jam cannot make the distinction, so we have to specify it here
|
||||
../../b2 $B2_OPTS toolset=clang cxxstd=17 cxxflags="-Wdeprecated-literal-operator" variant=histogram_ubasan test//all
|
||||
|
||||
@@ -22,7 +22,6 @@ constant boost_dependencies :
|
||||
project /boost/histogram
|
||||
: requirements
|
||||
<toolset>clang:<cxxflags>"-Wsign-compare -Wstrict-aliasing -fstrict-aliasing -Wvexing-parse -Wfloat-conversion"
|
||||
<toolset>darwin:<cxxflags>"-Wsign-compare -Wstrict-aliasing -fstrict-aliasing -Wvexing-parse -Wfloat-conversion"
|
||||
<toolset>gcc:<cxxflags>"-Wsign-compare -Wstrict-aliasing -fstrict-aliasing -Wfloat-conversion"
|
||||
<toolset>msvc:<cxxflags>"/bigobj"
|
||||
<toolset>intel-win:<cxxflags>"/bigobj"
|
||||
|
||||
@@ -23,7 +23,7 @@ constexpr unsigned parse_number(unsigned n, char f, Rest... rest) {
|
||||
namespace literals {
|
||||
/// Suffix operator to generate literal compile-time numbers, 0_c, 12_c, etc.
|
||||
template <char... digits>
|
||||
auto operator"" _c() {
|
||||
auto operator ""_c() {
|
||||
return std::integral_constant<unsigned, detail::parse_number(0, digits...)>();
|
||||
}
|
||||
} // namespace literals
|
||||
|
||||
Reference in New Issue
Block a user