File tree Expand file tree Collapse file tree 9 files changed +28
-18
lines changed Expand file tree Collapse file tree 9 files changed +28
-18
lines changed Original file line number Diff line number Diff line change @@ -263,7 +263,7 @@ jobs:
263263 CC : " /usr/lib/llvm-${{env.DEFAULT_LLVM_VERSION}}/bin/clang"
264264 CXX : " /usr/lib/llvm-${{env.DEFAULT_LLVM_VERSION}}/bin/clang++"
265265 PR_TARGET_BRANCH : ${{ steps.target_branch.outputs.branch }}
266- run : cmake -B ${{github.workspace}}/build -DCMAKE_CXX_STANDARD=${{env.DEFAULT_CXX_STANDARD}} -DCPM_SOURCE_CACHE=~/cpm-cache
266+ run : cmake -B ${{github.workspace}}/build -DCMAKE_CXX_STANDARD=17 -DCPM_SOURCE_CACHE=~/cpm-cache
267267
268268 - name : Save CPM cache
269269 env :
Original file line number Diff line number Diff line change 1313
1414namespace stdx {
1515inline namespace v1 {
16+ // NOLINTNEXTLINE(cppcoreguidelines-special-member-functions)
1617template <typename T> class atomic {
1718 static_assert (std::is_trivially_copyable_v<T> and
1819 std::is_copy_constructible_v<T> and
@@ -39,7 +40,7 @@ template <typename T> class atomic {
3940
4041 constexpr atomic () CPP20(requires std::is_default_constructible_v<elem_t >)
4142 : value{} {}
42- constexpr atomic (T t) : value{static_cast <elem_t >(t)} {}
43+ constexpr explicit atomic (T t) : value{static_cast <elem_t >(t)} {}
4344 atomic (atomic const &) = delete ;
4445 auto operator =(atomic const &) -> atomic & = delete ;
4546
@@ -52,7 +53,9 @@ template <typename T> class atomic {
5253 ::atomic::store (value, static_cast <elem_t >(t), mo);
5354 }
5455
56+ // NOLINTNEXTLINE(google-explicit-constructor)
5557 [[nodiscard]] operator T () const { return load (); }
58+ // NOLINTNEXTLINE(misc-unconventional-assign-operator)
5659 auto operator =(T t) -> T {
5760 store (t);
5861 return t;
Original file line number Diff line number Diff line change @@ -102,6 +102,7 @@ class atomic_bitset {
102102 return static_cast <StorageElem>(salient_value (order));
103103 }
104104
105+ // NOLINTNEXTLINE(google-explicit-constructor)
105106 operator bitset_t () const {
106107 return bitset_t {salient_value (std::memory_order_seq_cst)};
107108 }
Original file line number Diff line number Diff line change @@ -19,7 +19,8 @@ inline namespace v1 {
1919// endian
2020
2121#if __cpp_lib_endian < 201907L
22- enum struct endian {
22+ // NOLINTNEXTLINE(performance-enum-size)
23+ enum struct endian : underlying_type_t <decltype (__BYTE_ORDER__)> {
2324 little = __ORDER_LITTLE_ENDIAN__,
2425 big = __ORDER_BIG_ENDIAN__,
2526 native = __BYTE_ORDER__
@@ -262,14 +263,14 @@ constexpr auto bit_pack = [](auto... args) {
262263};
263264
264265template <>
265- constexpr auto bit_pack<std::uint16_t > =
266+ constexpr inline auto bit_pack<std::uint16_t > =
266267 [](std::uint8_t hi, std::uint8_t lo) -> std::uint16_t {
267268 return static_cast <std::uint16_t >((static_cast <std::uint32_t >(hi) << 8u ) |
268269 lo);
269270};
270271
271272template <>
272- constexpr auto bit_pack<std::uint32_t > =
273+ constexpr inline auto bit_pack<std::uint32_t > =
273274 stdx::overload{[](std::uint16_t hi, std::uint16_t lo) -> std::uint32_t {
274275 return (static_cast <std::uint32_t >(hi) << 16u ) | lo;
275276 },
@@ -281,7 +282,7 @@ constexpr auto bit_pack<std::uint32_t> =
281282 }};
282283
283284template <>
284- constexpr auto bit_pack<std::uint64_t > =
285+ constexpr inline auto bit_pack<std::uint64_t > =
285286 stdx::overload{[](std::uint32_t hi, std::uint32_t lo) -> std::uint64_t {
286287 return (static_cast <std::uint64_t >(hi) << 32u ) | lo;
287288 },
Original file line number Diff line number Diff line change 11#pragma once
22
3+ // NOLINTBEGIN(cppcoreguidelines-macro-usage)
4+
35#ifndef CONSTINIT
46#ifndef __cpp_constinit
57#if defined(__clang__)
5052#else
5153#define STDX_PRAGMA (X ) STDX_DO_PRAGMA(GCC X)
5254#endif
55+
56+ // NOLINTEND(cppcoreguidelines-macro-usage)
Original file line number Diff line number Diff line change @@ -31,6 +31,8 @@ auto panic(Args &&...args) -> void {
3131} // namespace v1
3232} // namespace stdx
3333
34+ // NOLINTBEGIN(cppcoreguidelines-macro-usage)
35+
3436#if __cplusplus >= 202002L
3537#define STDX_PANIC (MSG, ...) \
3638 [] { \
@@ -40,3 +42,5 @@ auto panic(Args &&...args) -> void {
4042#else
4143#define STDX_PANIC (...) stdx::panic(__VA_ARGS__)
4244#endif
45+
46+ // NOLINTEND(cppcoreguidelines-macro-usage)
Original file line number Diff line number Diff line change @@ -84,6 +84,8 @@ operator""_Gi(unsigned long long int n) -> unsigned long long int {
8484 return n * 1'024ull * 1'024ull * 1'024ull ;
8585}
8686
87+ // NOLINTBEGIN(cppcoreguidelines-macro-usage)
88+
8789#define STDX_SMALL_INT_LITERAL_DEF (x ) \
8890 CONSTEVAL auto operator " " _##x(char const *, std::size_t ) \
8991 ->std::integral_constant<std::size_t , x##u> { \
@@ -103,6 +105,8 @@ STDX_SMALL_INT_LITERAL_DEF(9)
103105
104106#undef STDX_SMALL_INT_LITERAL_DEF
105107
108+ // NOLINTEND(cppcoreguidelines-macro-usage)
109+
106110// NOLINTEND(google-runtime-int)
107111} // namespace literals
108112
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ template <typename T, typename U>
7878 if constexpr (t_is_const) {
7979 return std::as_const (u);
8080 } else {
81- return static_cast <U &> (u);
81+ return (u);
8282 }
8383 } else {
8484 if constexpr (t_is_const) {
@@ -182,6 +182,8 @@ constexpr auto is_aligned_with = [](auto v) -> bool {
182182} // namespace v1
183183} // namespace stdx
184184
185+ // NOLINTBEGIN(cppcoreguidelines-macro-usage)
186+
185187#ifndef FWD
186188#define FWD (x ) std::forward<decltype (x)>(x)
187189#endif
@@ -217,3 +219,5 @@ constexpr auto is_aligned_with = [](auto v) -> bool {
217219 STDX_PRAGMA (diagnostic pop) \
218220 }()
219221#endif
222+
223+ // NOLINTEND(cppcoreguidelines-macro-usage)
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments