diff --git a/include/boost/openmethod/core.hpp b/include/boost/openmethod/core.hpp
index 31c72eb..8b5ede9 100644
--- a/include/boost/openmethod/core.hpp
+++ b/include/boost/openmethod/core.hpp
@@ -104,7 +104,8 @@ struct is_unambiguous_accessible_base_of : std::is_base_of {
static_assert(
std::is_base_of_v ==
std::is_convertible_v,
- "class must be an accessible unambiguous base, repeated inheritance is not "
+ "class must be an accessible unambiguous base, repeated inheritance is "
+ "not "
"supported");
};
diff --git a/include/boost/openmethod/default_registry.hpp b/include/boost/openmethod/default_registry.hpp
index fd9314c..38ad1b9 100644
--- a/include/boost/openmethod/default_registry.hpp
+++ b/include/boost/openmethod/default_registry.hpp
@@ -37,8 +37,7 @@ namespace boost::openmethod {
//! including those pulled from libraries.
struct default_registry
: registry<
- policies::std_rtti, policies
- ::vptr_vector,
+ policies::std_rtti, policies ::vptr_vector,
policies::fast_perfect_hash, policies::default_error_handler,
policies::stderr_output
#ifdef BOOST_OPENMETHOD_ENABLE_RUNTIME_CHECKS
diff --git a/include/boost/openmethod/policies/fast_perfect_hash.hpp b/include/boost/openmethod/policies/fast_perfect_hash.hpp
index 890835a..c04bc38 100644
--- a/include/boost/openmethod/policies/fast_perfect_hash.hpp
+++ b/include/boost/openmethod/policies/fast_perfect_hash.hpp
@@ -150,7 +150,7 @@ struct fast_perfect_hash : type_hash {
//! arguments.
//! @param options Zero or more option objects.
template
- static auto finalize(std::tuple opts) -> void {
+ static auto finalize(std::tuple) -> void {
detail::fast_perfect_hash_control.clear();
}
};
diff --git a/include/boost/openmethod/policies/vptr_map.hpp b/include/boost/openmethod/policies/vptr_map.hpp
index a534420..64b24e2 100644
--- a/include/boost/openmethod/policies/vptr_map.hpp
+++ b/include/boost/openmethod/policies/vptr_map.hpp
@@ -48,7 +48,7 @@ class vptr_map : public vptr {
template
static void initialize(
ForwardIterator first, ForwardIterator last,
- std::tuple opts) {
+ std::tuple) {
decltype(vptrs) new_vptrs;
for (auto iter = first; iter != last; ++iter) {
diff --git a/include/boost/openmethod/preamble.hpp b/include/boost/openmethod/preamble.hpp
index a4014b0..055cfbd 100644
--- a/include/boost/openmethod/preamble.hpp
+++ b/include/boost/openmethod/preamble.hpp
@@ -112,7 +112,7 @@ template
template
std::size_t odr_check::inc = count++;
-}
+} // namespace detail
//! Registry not initialized
struct not_initialized : openmethod_error {
diff --git a/test/Jamfile b/test/Jamfile
index 370001e..5eecf77 100644
--- a/test/Jamfile
+++ b/test/Jamfile
@@ -23,9 +23,10 @@ project
extra
- # msvc:on
- # gcc:on
- # clang:on
+ msvc:on
+ gcc:on
+ clang,!NT:on
+ # !NT because it causes errors when builting unit-test
;
alias unit_test_framework
diff --git a/test/compile_fail_non_polymorphic_virtual_ptr.cpp b/test/compile_fail_non_polymorphic_virtual_ptr.cpp
index 8dc1c6d..8d836f7 100644
--- a/test/compile_fail_non_polymorphic_virtual_ptr.cpp
+++ b/test/compile_fail_non_polymorphic_virtual_ptr.cpp
@@ -10,6 +10,7 @@ struct Cat {};
int main() {
Cat felix;
boost::openmethod::virtual_ptr p(felix);
+ (void)p;
return 0;
}
diff --git a/test/compile_fail_virtual_parameter_private_base_core.cpp b/test/compile_fail_virtual_parameter_private_base_core.cpp
index 7474e23..5440a07 100644
--- a/test/compile_fail_virtual_parameter_private_base_core.cpp
+++ b/test/compile_fail_virtual_parameter_private_base_core.cpp
@@ -24,8 +24,8 @@ struct poke;
auto poke_cat(virtual_ptr) -> void {
}
-BOOST_OPENMETHOD_REGISTER(method)>::override);
-
+BOOST_OPENMETHOD_REGISTER(
+ method)>::override);
int main() {
}
diff --git a/test/test_class_registration.cpp b/test/test_class_registration.cpp
index 326aec6..55b39f8 100644
--- a/test/test_class_registration.cpp
+++ b/test/test_class_registration.cpp
@@ -41,7 +41,6 @@ BOOST_AUTO_TEST_CASE(unknown_class_overrider) {
} // namespace TEST_NS
-
namespace TEST_NS {
struct registry : test_registry_<__COUNTER__>::with<
@@ -62,7 +61,6 @@ BOOST_AUTO_TEST_CASE(missing_base_class) {
} // namespace TEST_NS
-
namespace TEST_NS {
struct registry : test_registry_<__COUNTER__>::with<
diff --git a/test/test_dispatch.cpp b/test/test_dispatch.cpp
index 6c7e66e..780367f 100644
--- a/test/test_dispatch.cpp
+++ b/test/test_dispatch.cpp
@@ -340,10 +340,9 @@ BOOST_AUTO_TEST_CASE(simple) {
BOOST_TEST(
!detail::vptr_vector_vptrs.empty());
test_registry::finalize();
- static_assert(
- detail::has_finalize_aux<
- void,
- test_registry::policy, std::tuple<>>::value);
+ static_assert(detail::has_finalize_aux<
+ void, test_registry::policy,
+ std::tuple<>>::value);
BOOST_TEST(
detail::vptr_vector_vptrs.empty());
}
diff --git a/test/test_inplace_vptr.cpp b/test/test_inplace_vptr.cpp
index 39b0304..87abf77 100644
--- a/test/test_inplace_vptr.cpp
+++ b/test/test_inplace_vptr.cpp
@@ -43,7 +43,9 @@ struct Pet : bom::inplace_vptr_base {
std::ostream& os;
};
-struct DomesticCat : Cat, Pet, bom::inplace_vptr_derived {
+struct DomesticCat : Cat,
+ Pet,
+ bom::inplace_vptr_derived {
explicit DomesticCat(std::ostream& os);
~DomesticCat();
};
diff --git a/test/test_n2216.cpp b/test/test_n2216.cpp
index 38fb536..6b27fbc 100644
--- a/test/test_n2216.cpp
+++ b/test/test_n2216.cpp
@@ -45,8 +45,9 @@ BOOST_OPENMETHOD_OVERRIDE(
return std::make_unique();
}
-static_assert(std::is_same_v<
- detail::virtual_type, test_registry>, matrix>);
+static_assert(
+ std::is_same_v<
+ detail::virtual_type, test_registry>, matrix>);
BOOST_AUTO_TEST_CASE(covariant_return_type) {
auto compiler = boost::openmethod::initialize(n2216());
diff --git a/test/test_rolex.cpp b/test/test_rolex.cpp
index 3f5970b..36cc39d 100644
--- a/test/test_rolex.cpp
+++ b/test/test_rolex.cpp
@@ -35,7 +35,8 @@ struct Taxi : Expense {};
struct PrivateJet : Expense {};
BOOST_OPENMETHOD_CLASSES(
- Role, Employee, Manager, Founder, Expense, Public, Bus, Metro, Taxi, PrivateJet);
+ Role, Employee, Manager, Founder, Expense, Public, Bus, Metro, Taxi,
+ PrivateJet);
BOOST_OPENMETHOD(pay, (virtual_ptr), double);
BOOST_OPENMETHOD(
diff --git a/test/test_runtime_errors.cpp b/test/test_runtime_errors.cpp
index 333551c..570ab5d 100644
--- a/test/test_runtime_errors.cpp
+++ b/test/test_runtime_errors.cpp
@@ -194,7 +194,7 @@ BOOST_AUTO_TEST_CASE(bad_call) {
}
BOOST_AUTO_TEST_CASE(bad_call_type_ids) {
- auto report = initialize().report;
+ initialize();
registry::capture capture;
try {
diff --git a/test/test_shared_virtual_ptr_value_semantics.cpp b/test/test_shared_virtual_ptr_value_semantics.cpp
index d4d0db4..75b4baa 100644
--- a/test/test_shared_virtual_ptr_value_semantics.cpp
+++ b/test/test_shared_virtual_ptr_value_semantics.cpp
@@ -68,7 +68,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(
BOOST_TEST(p.get() == snoopy.get());
BOOST_TEST(p.vptr() == Registry::template static_vptr);
- p = p;
+ p = *&p;
BOOST_TEST(p.get() == snoopy.get());
BOOST_TEST(p.vptr() == Registry::template static_vptr);
@@ -294,7 +294,7 @@ BOOST_AUTO_TEST_CASE(cast_shared_ptr_lvalue_reference) {
bool cast_moves() {
std::shared_ptr animal = std::make_shared();
- std::static_pointer_cast(animal);
+ (void) std::static_pointer_cast(animal);
return animal.get() == nullptr;
}