mirror of
https://github.com/fmtlib/fmt.git
synced 2025-12-01 14:49:33 +01:00
Fix an odr violation in ranges.h (#2483)
* Add a testcase demonstrating ODR violation in ranges.h * Fix ODR violation in ranges.h * Fix comments Co-authored-by: Pierre-Antoine Lacaze <pa.lacaze@gmail.com>
This commit is contained in:
committed by
GitHub
parent
ee0659f8b6
commit
d58d19ba32
@@ -437,7 +437,7 @@ auto find_escape(const Char* begin, const Char* end)
|
||||
return {begin, nullptr, 0};
|
||||
}
|
||||
|
||||
auto find_escape(const char* begin, const char* end)
|
||||
inline auto find_escape(const char* begin, const char* end)
|
||||
-> find_escape_result<char> {
|
||||
if (!is_utf8()) return find_escape<char>(begin, end);
|
||||
auto result = find_escape_result<char>{end, nullptr, 0};
|
||||
|
||||
Reference in New Issue
Block a user