util/ConstBuffer, ...: use using
instead of typedef
This commit is contained in:
parent
cc3e71d8c7
commit
3a51fe31df
@ -44,11 +44,11 @@ struct ConstBuffer;
|
|||||||
template<>
|
template<>
|
||||||
struct ConstBuffer<void> {
|
struct ConstBuffer<void> {
|
||||||
typedef std::size_t size_type;
|
typedef std::size_t size_type;
|
||||||
typedef void value_type;
|
using value_type = void;
|
||||||
typedef const void *pointer;
|
using pointer = const void *;
|
||||||
typedef pointer const_pointer;
|
using const_pointer = pointer;
|
||||||
typedef pointer iterator;
|
using iterator = pointer;
|
||||||
typedef pointer const_iterator;
|
using const_iterator = pointer;
|
||||||
|
|
||||||
pointer data;
|
pointer data;
|
||||||
size_type size;
|
size_type size;
|
||||||
@ -91,14 +91,14 @@ struct ConstBuffer<void> {
|
|||||||
*/
|
*/
|
||||||
template<typename T>
|
template<typename T>
|
||||||
struct ConstBuffer {
|
struct ConstBuffer {
|
||||||
typedef std::size_t size_type;
|
using size_type = std::size_t;
|
||||||
typedef T value_type;
|
using value_type = T;
|
||||||
typedef const T &reference;
|
using reference = const T &;
|
||||||
typedef reference const_reference;
|
using const_reference = reference;
|
||||||
typedef const T *pointer;
|
using pointer = const T *;
|
||||||
typedef pointer const_pointer;
|
using const_pointer = pointer;
|
||||||
typedef pointer iterator;
|
using iterator = pointer;
|
||||||
typedef pointer const_iterator;
|
using const_iterator = pointer;
|
||||||
|
|
||||||
pointer data;
|
pointer data;
|
||||||
size_type size;
|
size_type size;
|
||||||
|
@ -39,19 +39,19 @@ template<typename T, std::size_t CAPACITY>
|
|||||||
class BasicStringBuffer {
|
class BasicStringBuffer {
|
||||||
public:
|
public:
|
||||||
typedef T value_type;
|
typedef T value_type;
|
||||||
typedef T &reference;
|
using reference = T &;
|
||||||
typedef T *pointer;
|
using pointer = T *;
|
||||||
typedef const T *const_pointer;
|
using const_pointer = const T *;
|
||||||
typedef std::size_t size_type;
|
using size_type = std::size_t;
|
||||||
|
|
||||||
static constexpr value_type SENTINEL = '\0';
|
static constexpr value_type SENTINEL = '\0';
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
typedef std::array<value_type, CAPACITY> Array;
|
using Array = std::array<value_type, CAPACITY>;
|
||||||
Array the_data;
|
Array the_data;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef typename Array::const_iterator const_iterator;
|
using const_iterator = typename Array::const_iterator;
|
||||||
|
|
||||||
constexpr size_type capacity() const noexcept {
|
constexpr size_type capacity() const noexcept {
|
||||||
return CAPACITY;
|
return CAPACITY;
|
||||||
|
@ -45,11 +45,11 @@ struct WritableBuffer;
|
|||||||
template<>
|
template<>
|
||||||
struct WritableBuffer<void> {
|
struct WritableBuffer<void> {
|
||||||
typedef std::size_t size_type;
|
typedef std::size_t size_type;
|
||||||
typedef void value_type;
|
using value_type = void;
|
||||||
typedef void *pointer;
|
using pointer = void *;
|
||||||
typedef const void *const_pointer;
|
using const_pointer = const void *;
|
||||||
typedef pointer iterator;
|
using iterator = pointer;
|
||||||
typedef const_pointer const_iterator;
|
using const_iterator = const_pointer;
|
||||||
|
|
||||||
pointer data;
|
pointer data;
|
||||||
size_type size;
|
size_type size;
|
||||||
@ -90,14 +90,14 @@ struct WritableBuffer<void> {
|
|||||||
*/
|
*/
|
||||||
template<typename T>
|
template<typename T>
|
||||||
struct WritableBuffer {
|
struct WritableBuffer {
|
||||||
typedef std::size_t size_type;
|
using size_type = std::size_t;
|
||||||
typedef T value_type;
|
using value_type = T;
|
||||||
typedef T &reference;
|
using reference = T &;
|
||||||
typedef const T &const_reference;
|
using const_reference = const T &;
|
||||||
typedef T *pointer;
|
using pointer = T *;
|
||||||
typedef const T *const_pointer;
|
using const_pointer = const T *;
|
||||||
typedef pointer iterator;
|
using iterator = pointer;
|
||||||
typedef const_pointer const_iterator;
|
using const_iterator = const_pointer;
|
||||||
|
|
||||||
pointer data;
|
pointer data;
|
||||||
size_type size;
|
size_type size;
|
||||||
|
Loading…
Reference in New Issue
Block a user