Disallow to_string for bool.

This commit is contained in:
levlam 2023-02-22 14:53:48 +03:00
parent b4a86fb299
commit 1c43f3844b

View File

@ -157,7 +157,8 @@ class StringBuilder {
};
template <class T>
std::enable_if_t<std::is_arithmetic<T>::value, string> to_string(const T &x) {
std::enable_if_t<std::is_arithmetic<T>::value && !std::is_same<std::decay_t<T>, bool>::value, string> to_string(
const T &x) {
const size_t buf_size = 1000;
auto buf = StackAllocator::alloc(buf_size);
StringBuilder sb(buf.as_slice());