mirror of
https://github.com/wichtounet/thor-os.git
synced 2025-08-04 01:36:10 -04:00
GCC 9.2.0: Fix in the TSTL
This commit is contained in:
parent
67166266c4
commit
26bbf11772
@ -189,7 +189,9 @@ void fill_n(ForwardIterator first, size_t count, const T& value){
|
|||||||
*/
|
*/
|
||||||
template<typename ForwardIterator, typename T, std::enable_if_t<std::is_integral<typename std::iterator_traits<ForwardIterator>::value_type>::value && is_integral<T>::value, int> = 42>
|
template<typename ForwardIterator, typename T, std::enable_if_t<std::is_integral<typename std::iterator_traits<ForwardIterator>::value_type>::value && is_integral<T>::value, int> = 42>
|
||||||
void fill_n(ForwardIterator first, size_t count, const T& value){
|
void fill_n(ForwardIterator first, size_t count, const T& value){
|
||||||
if(!value){
|
// TODO This is definitely not good, should properly compare to zero
|
||||||
|
bool v{value};
|
||||||
|
if(!v){
|
||||||
memclr(reinterpret_cast<char*>(first), count * sizeof(decltype(*first)));
|
memclr(reinterpret_cast<char*>(first), count * sizeof(decltype(*first)));
|
||||||
} else {
|
} else {
|
||||||
if(count > 0){
|
if(count > 0){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user