oneDPL
oneDPL copied to clipboard
Simplify constructor calls
In this PR we simplify constructor calls in oneDPL code:
- before:
if constexpr (std::is_trivial_v<_TargetValueType>)
__target = std::forward<_SourceT>(__source);
else
::new (std::addressof(__target)) _TargetValueType(std::forward<_SourceT>(__source));
- after:
::new (std::addressof(__target)) _TargetValueType(std::forward<_SourceT>(__source));
We able to make this change because C++ compiler will optimize constructor call for trivial data types.