diff options
Diffstat (limited to 'src/util/WritableBuffer.hxx')
-rw-r--r-- | src/util/WritableBuffer.hxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/util/WritableBuffer.hxx b/src/util/WritableBuffer.hxx index d13f80867..1fe1b254f 100644 --- a/src/util/WritableBuffer.hxx +++ b/src/util/WritableBuffer.hxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013 Max Kellermann <max@duempel.org> + * Copyright (C) 2013-2014 Max Kellermann <max@duempel.org> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -80,6 +80,8 @@ struct WritableBuffer<void> { template<typename T> struct WritableBuffer { typedef size_t size_type; + typedef T &reference_type; + typedef const T &const_reference_type; typedef T *pointer_type; typedef const T *const_pointer_type; typedef pointer_type iterator; @@ -149,7 +151,7 @@ struct WritableBuffer { #ifdef NDEBUG constexpr #endif - T &operator[](size_type i) const { + reference_type operator[](size_type i) const { #ifndef NDEBUG assert(i < size); #endif |