mirror of
https://github.com/fmtlib/fmt.git
synced 2025-08-01 03:34:45 +02:00
Properly constrain detail::copy
optimization (#4474)
This commit is contained in:
committed by
GitHub
parent
a5dccffa56
commit
1ef8348070
@@ -279,6 +279,17 @@ TEST(base_test, is_back_insert_iterator) {
|
||||
std::front_insert_iterator<std::string>>::value);
|
||||
}
|
||||
|
||||
struct minimal_container {
|
||||
using value_type = char;
|
||||
void push_back(char) {}
|
||||
};
|
||||
|
||||
TEST(base_test, copy) {
|
||||
minimal_container c;
|
||||
static constexpr char str[] = "a";
|
||||
fmt::detail::copy<char>(str, str + 1, std::back_inserter(c));
|
||||
}
|
||||
|
||||
TEST(base_test, get_buffer) {
|
||||
mock_buffer<char> buffer;
|
||||
void* buffer_ptr = &buffer;
|
||||
|
Reference in New Issue
Block a user