util/ConstBuffer, ...: use using instead of typedef

This commit is contained in:
Max Kellermann
2020-04-06 15:19:06 +02:00
parent cc3e71d8c7
commit 3a51fe31df
3 changed files with 32 additions and 32 deletions

View File

@@ -39,19 +39,19 @@ template<typename T, std::size_t CAPACITY>
class BasicStringBuffer {
public:
typedef T value_type;
typedef T &reference;
typedef T *pointer;
typedef const T *const_pointer;
typedef std::size_t size_type;
using reference = T &;
using pointer = T *;
using const_pointer = const T *;
using size_type = std::size_t;
static constexpr value_type SENTINEL = '\0';
protected:
typedef std::array<value_type, CAPACITY> Array;
using Array = std::array<value_type, CAPACITY>;
Array the_data;
public:
typedef typename Array::const_iterator const_iterator;
using const_iterator = typename Array::const_iterator;
constexpr size_type capacity() const noexcept {
return CAPACITY;