From 35a186fee211e2ce971b1549a2f7137ac359c809 Mon Sep 17 00:00:00 2001 From: Yiding Jia Date: Thu, 29 Nov 2012 14:03:25 -0800 Subject: [PATCH] fix std::out_of_range calls to use real constructors Summary: curiously, std::out_of_range doesn't have a zero-argument constructor according to the spec. This was causing issues in my clang setup... Test Plan: compiles. Reviewed By: delong.j@fb.com FB internal diff: D643363 --- folly/small_vector.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/folly/small_vector.h b/folly/small_vector.h index 5f7e2733..4a0fa276 100644 --- a/folly/small_vector.h +++ b/folly/small_vector.h @@ -846,14 +846,14 @@ public: reference at(size_type i) { if (i >= size()) { - throw std::out_of_range(); + throw std::out_of_range("index out of range"); } return (*this)[i]; } const_reference at(size_type i) const { if (i >= size()) { - throw std::out_of_range(); + throw std::out_of_range("index out of range"); } return (*this)[i]; } -- 2.34.1