Use std::fill for FVector's constructor with single scalar argument
Merge request reports
Activity
added cleanup label
- Resolved by Santiago Ospina De Los Ríos
What's the issue with the loop? While I like it, I have had problems with
std::fill
inconstexpr
contexts. Some standard libraries still seem to not have it.
- Resolved by Santiago Ospina De Los Ríos
I think, in !1407 (merged) I just changed it back from
std::fill
to a raw loop, to make code compile inconstexpr
context. I could be that in the meantime we have updated our compilers and now it is fine.What about the
noexcept
constraints on the functions? Do they still apply, or do we need to change it fromis_nothrow_copy_assignable_v
to something else? I find it a bit harder to reason about the code with thestd::fill
. I also don't know whether there would be a "performance benefit". One could also argue in the opposite direction: it is much harder for the compiler to optimize the code withstd::fill
since all information about the underlying data is gone. But, probably there will be no difference in the assembly code (but I didn't check).
added 8 commits
-
e02fb9cc...6e3484eb - 7 commits from branch
master
- 4435c26f - fvector: Use std::fill for constructor with single scalar argument
-
e02fb9cc...6e3484eb - 7 commits from branch
added 8 commits
-
4435c26f...aa5e86be - 7 commits from branch
master
- c197c12a - fvector: Use std::fill for constructor with single scalar argument
-
4435c26f...aa5e86be - 7 commits from branch
mentioned in commit 6998e4df