diff --git a/include/mettle/detail/forward_if.hpp b/include/mettle/detail/forward_if.hpp index b883926..cba06b2 100644 --- a/include/mettle/detail/forward_if.hpp +++ b/include/mettle/detail/forward_if.hpp @@ -7,17 +7,17 @@ namespace mettle::detail { template struct ref_if { - using type = typename std::conditional< - std::is_lvalue_reference::value, - typename std::remove_reference::type &, - typename std::remove_reference::type && - >::type; + using type = std::conditional_t< + std::is_lvalue_reference_v, + std::remove_reference_t &, + std::remove_reference_t && + >; }; template inline decltype(auto) forward_if(Element &&value) { - return static_cast::type>(value); + return static_cast::type>(value); } } // namespace mettle::detail diff --git a/include/mettle/detail/tuple_algorithm.hpp b/include/mettle/detail/tuple_algorithm.hpp index b04dd6b..650f455 100644 --- a/include/mettle/detail/tuple_algorithm.hpp +++ b/include/mettle/detail/tuple_algorithm.hpp @@ -35,8 +35,8 @@ namespace mettle::detail { template void tuple_for_each(Tuple &&tuple, Func &&f) { - using T = typename std::remove_reference::type; - static_for::value>([&](auto i) { + using T = std::remove_reference_t; + static_for>([&](auto i) { return f(std::get(tuple)); }); } diff --git a/include/mettle/driver/log/indent.hpp b/include/mettle/driver/log/indent.hpp index ec3c91b..b210dc3 100644 --- a/include/mettle/driver/log/indent.hpp +++ b/include/mettle/driver/log/indent.hpp @@ -18,7 +18,7 @@ namespace mettle { class basic_indenting_streambuf : public std::basic_streambuf { public: using base_type = std::basic_streambuf; - using int_type = typename base_type::int_type; + using int_type = base_type::int_type; basic_indenting_streambuf(base_type *buf, std::size_t base_indent = 2) : buf_(buf), base_indent_(base_indent) {} diff --git a/include/mettle/driver/object_factory.hpp b/include/mettle/driver/object_factory.hpp index 5f6a87f..fae666e 100644 --- a/include/mettle/driver/object_factory.hpp +++ b/include/mettle/driver/object_factory.hpp @@ -18,7 +18,7 @@ namespace mettle { using result_type = Result; using function_type = std::function; using container_type = std::map; - using iterator = typename container_type::const_iterator; + using iterator = container_type::const_iterator; void add(std::string name, function_type f) { registry_.emplace(std::move(name), std::move(f)); diff --git a/include/mettle/matchers/core.hpp b/include/mettle/matchers/core.hpp index 7b223ad..08fda68 100644 --- a/include/mettle/matchers/core.hpp +++ b/include/mettle/matchers/core.hpp @@ -106,7 +106,7 @@ namespace mettle { > {}; template - using ensure_matcher_t = typename ensure_matcher_type::type; + using ensure_matcher_t = ensure_matcher_type::type; template inline auto is_not(T &&thing) { diff --git a/include/mettle/output/to_printable.hpp b/include/mettle/output/to_printable.hpp index 0be3961..3049dc7 100644 --- a/include/mettle/output/to_printable.hpp +++ b/include/mettle/output/to_printable.hpp @@ -136,7 +136,7 @@ namespace mettle { } } else if constexpr(std::is_enum_v) { return type_name() + "(" + std::to_string( - static_cast::type>(t) + static_cast>(t) ) + ")"; } else if constexpr(std::is_same_v, bool>) { return t ? "true" : "false"; diff --git a/include/mettle/suite/compiled_suite.hpp b/include/mettle/suite/compiled_suite.hpp index 018af41..c2cd129 100644 --- a/include/mettle/suite/compiled_suite.hpp +++ b/include/mettle/suite/compiled_suite.hpp @@ -36,7 +36,7 @@ namespace mettle { friend class compiled_suite; public: using test_info = basic_test_info; - using iterator = typename std::vector::const_iterator; + using iterator = std::vector::const_iterator; template diff --git a/include/mettle/suite/make_suite.hpp b/include/mettle/suite/make_suite.hpp index 342faa1..47c122a 100644 --- a/include/mettle/suite/make_suite.hpp +++ b/include/mettle/suite/make_suite.hpp @@ -77,11 +77,11 @@ namespace mettle { struct wrapped_suite> { - using type = typename Wrap::compiled_suite_type; + using type = Wrap::compiled_suite_type; }; template - typename wrapped_suite::type + wrapped_suite::type finalize(Builder &b, const Wrap &wrap) { return { std::move(b.name_), std::move(b.tests_), std::move(b.subsuites_), @@ -323,7 +323,7 @@ namespace mettle { }; template - using suite_builder_base_t = typename suite_builder_base_type< + using suite_builder_base_t = suite_builder_base_type< Factory, Parent, InChild >::type; @@ -344,7 +344,7 @@ namespace mettle { using test_caller = detail::test_caller; template - friend typename detail::wrapped_suite::type + friend detail::wrapped_suite::type detail::finalize(Builder &, const Wrap &); factory_type factory_; @@ -391,11 +391,11 @@ namespace mettle { template struct fixture_type { - using type = typename std::remove_reference_t::fixture_type; + using type = std::remove_reference_t::fixture_type; }; template - using fixture_type_t = typename fixture_type::type; + using fixture_type_t = fixture_type::type; } // namespace mettle diff --git a/test/helpers.hpp b/test/helpers.hpp index 9891fd1..af851d3 100644 --- a/test/helpers.hpp +++ b/test/helpers.hpp @@ -110,7 +110,7 @@ namespace mettle { return basic_matcher( ensure_matcher(std::forward(thing)), [](const boost::any &actual, auto &&matcher) -> match_result { - using ValueType = typename std::remove_reference::type; + using ValueType = std::remove_reference_t; auto value = boost::any_cast(&actual); if(!value) return { diff --git a/test/suite/test_test_caller.cpp b/test/suite/test_test_caller.cpp index 3b7fe58..eb026e7 100644 --- a/test/suite/test_test_caller.cpp +++ b/test/suite/test_test_caller.cpp @@ -12,7 +12,7 @@ struct run_counter_from_tuple_t> { }; template -using run_counter_from_tuple = typename run_counter_from_tuple_t::type; +using run_counter_from_tuple = run_counter_from_tuple_t::type; using namespace mettle::detail;