util/CopyConst: use std::add_const

This commit is contained in:
Max Kellermann 2022-06-08 21:07:45 +02:00 committed by Max Kellermann
parent 5d34b9b5bb
commit e7b587d550

View File

@ -36,5 +36,5 @@
*/
template<typename To, typename From>
using CopyConst = std::conditional_t<std::is_const_v<From>,
const To,
To>;
std::add_const_t<To>,
std::remove_const_t<To>>;