diff --git a/include/fmt/compile.h b/include/fmt/compile.h index f7b510dd..a752ffb4 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -431,68 +431,6 @@ struct compiletime_parts_provider { } }; -template -struct parts_container_concept_check : std::true_type { - static_assert(std::is_copy_constructible::value, - "PartsContainer is not copy constructible"); - static_assert(std::is_move_constructible::value, - "PartsContainer is not move constructible"); - - template - struct has_format_part_type : std::false_type {}; - template - struct has_format_part_type> - : std::true_type {}; - - static_assert(has_format_part_type::value, - "PartsContainer doesn't provide format_part_type"); - - struct check_second {}; - struct check_first : check_second {}; - - template static std::false_type has_add_check(check_second); - template - static decltype( - (void)std::declval().add(std::declval()), - std::true_type()) has_add_check(check_first); - using has_add = decltype(has_add_check(check_first())); - static_assert(has_add::value, "PartsContainer doesn't provide add() method"); - - template static std::false_type has_last_check(check_second); - template - static decltype((void)std::declval().last(), - std::true_type()) has_last_check(check_first); - using has_last = decltype(has_last_check(check_first())); - static_assert(has_last::value, - "PartsContainer doesn't provide last() method"); - - template - static std::false_type has_substitute_last_check(check_second); - template - static decltype((void)std::declval().substitute_last( - std::declval()), - std::true_type()) has_substitute_last_check(check_first); - using has_substitute_last = - decltype(has_substitute_last_check(check_first())); - static_assert(has_substitute_last::value, - "PartsContainer doesn't provide substitute_last() method"); - - template static std::false_type has_begin_check(check_second); - template - static decltype((void)std::declval().begin(), - std::true_type()) has_begin_check(check_first); - using has_begin = decltype(has_begin_check(check_first())); - static_assert(has_begin::value, - "PartsContainer doesn't provide begin() method"); - - template static std::false_type has_end_check(check_second); - template - static decltype((void)std::declval().end(), - std::true_type()) has_end_check(check_first); - using has_end = decltype(has_end_check(check_first())); - static_assert(has_end::value, "PartsContainer doesn't provide end() method"); -}; - template struct parts_provider_type { using type = compiletime_parts_provider< @@ -501,8 +439,6 @@ struct parts_provider_type { template struct parts_provider_type { - static_assert(parts_container_concept_check::value, - "Parts container doesn't meet the concept"); using type = runtime_parts_provider; };