aboutsummaryrefslogtreecommitdiffstats
path: root/src/util/ConstBuffer.hxx
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/util/ConstBuffer.hxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/util/ConstBuffer.hxx b/src/util/ConstBuffer.hxx
index 2670489b1..bb114d44d 100644
--- a/src/util/ConstBuffer.hxx
+++ b/src/util/ConstBuffer.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
@@ -86,6 +86,8 @@ struct ConstBuffer<void> {
template<typename T>
struct ConstBuffer {
typedef size_t size_type;
+ typedef const T &reference_type;
+ typedef reference_type const_reference_type;
typedef const T *pointer_type;
typedef pointer_type const_pointer_type;
typedef pointer_type iterator;
@@ -155,7 +157,7 @@ struct ConstBuffer {
#ifdef NDEBUG
constexpr
#endif
- const T &operator[](size_type i) const {
+ reference_type operator[](size_type i) const {
#ifndef NDEBUG
assert(i < size);
#endif