aboutsummaryrefslogtreecommitdiff
path: root/butl
diff options
context:
space:
mode:
Diffstat (limited to 'butl')
-rw-r--r--butl/vector-view9
1 files changed, 7 insertions, 2 deletions
diff --git a/butl/vector-view b/butl/vector-view
index fdff783..16cb1d1 100644
--- a/butl/vector-view
+++ b/butl/vector-view
@@ -81,11 +81,16 @@ namespace butl
// element access:
//
reference operator[](size_type n) const {return data_[n];}
- reference at(size_type n) const {
- if (n >= size_) throw std::out_of_range (); return data_[n];}
reference front() const {return data_[0];}
reference back() const {return data_[size_ - 1];}
+ reference at(size_type n) const
+ {
+ if (n >= size_)
+ throw std::out_of_range ("index out of range");
+ return data_[n];
+ }
+
// data access:
//
T* data() const {return data_;}