From b94a7282ecbde37c2b88fd8327a409cebe046b30 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 16 Sep 2022 18:37:05 -0400 Subject: Fix potential ODR violations due to definitions in headers --- .clang-tidy | 1 - include/chilbert/DynamicBitVec.hpp | 4 ++-- include/chilbert/SmallBitVec.hpp | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index f2608a1..38a5674 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -28,7 +28,6 @@ Checks: > -hicpp-explicit-conversions, -llvm-header-guard, -llvmlibc-*, - -misc-definitions-in-headers, -modernize-return-braced-init-list, -modernize-use-bool-literals, -modernize-use-trailing-return-type, diff --git a/include/chilbert/DynamicBitVec.hpp b/include/chilbert/DynamicBitVec.hpp index 722b689..e834ee0 100644 --- a/include/chilbert/DynamicBitVec.hpp +++ b/include/chilbert/DynamicBitVec.hpp @@ -137,14 +137,14 @@ struct is_bitvec }; template <> -void +inline void gray_code(DynamicBitVec& value) { gray_code(static_cast&>(value)); } template <> -void +inline void gray_code_inv(DynamicBitVec& value) { gray_code_inv(static_cast&>(value)); diff --git a/include/chilbert/SmallBitVec.hpp b/include/chilbert/SmallBitVec.hpp index 4ddce46..b1fe474 100644 --- a/include/chilbert/SmallBitVec.hpp +++ b/include/chilbert/SmallBitVec.hpp @@ -358,14 +358,14 @@ struct is_bitvec }; template <> -void +inline void gray_code(SmallBitVec& value) { value.rack() ^= (value.rack() >> 1U); } template <> -void +inline void gray_code_inv(SmallBitVec& value) { gray_code_inv(value.rack()); -- cgit v1.2.1