Commit 154cd9c
committed
Fix constexpr insert for Clang 3.7
The iterator-based insert(const_iterator, size_type, value_type)
function relies on traits_type::move() to shift the existing null
terminator to its new position. Clang 3.7's constexpr evaluator does not
handle this correctly, causing the following test to fail:
static_string<3>{"ab"}.insert(2, 1, 'c') == "abc"
Add an explicit term() call, guarded by a preprocessor conditional for
Clang 3.7, to ensure proper null termination.1 parent aa3f7ea commit 154cd9c
1 file changed
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6707 | 6707 | | |
6708 | 6708 | | |
6709 | 6709 | | |
| 6710 | + | |
| 6711 | + | |
| 6712 | + | |
6710 | 6713 | | |
6711 | 6714 | | |
6712 | 6715 | | |
| |||
0 commit comments