Disallow to_string for bool.
This commit is contained in:
parent
b4a86fb299
commit
1c43f3844b
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user