summaryrefslogtreecommitdiff
path: root/compiler/utils/array_ref.h
diff options
context:
space:
mode:
author Ian Rogers <irogers@google.com> 2014-11-04 04:02:48 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2014-11-04 04:02:49 +0000
commita10a8b56a01be95b3ec13022d3a155e163a11673 (patch)
tree9df58b57af13240a93a6da4eefcf03f70cce9ad9 /compiler/utils/array_ref.h
parentc6e0955737e15f7c0c3575d4e13789b3411f4993 (diff)
parent6a3c1fcb4ba42ad4d5d142c17a3712a6ddd3866f (diff)
Merge "Remove -Wno-unused-parameter and -Wno-sign-promo from base cflags."
Diffstat (limited to 'compiler/utils/array_ref.h')
-rw-r--r--compiler/utils/array_ref.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/compiler/utils/array_ref.h b/compiler/utils/array_ref.h
index e6b4a6a47c..c137e46804 100644
--- a/compiler/utils/array_ref.h
+++ b/compiler/utils/array_ref.h
@@ -68,7 +68,8 @@ class ArrayRef {
template <typename U, size_t size>
constexpr ArrayRef(U (&array)[size],
- typename std::enable_if<std::is_same<T, const U>::value, tag>::type t = tag())
+ typename std::enable_if<std::is_same<T, const U>::value, tag>::type
+ t ATTRIBUTE_UNUSED = tag())
: array_(array), size_(size) {
}
@@ -76,12 +77,6 @@ class ArrayRef {
: array_(array), size_(size) {
}
- template <typename U>
- constexpr ArrayRef(U* array, size_t size,
- typename std::enable_if<std::is_same<T, const U>::value, tag>::type t = tag())
- : array_(array), size_(size) {
- }
-
template <typename Alloc>
explicit ArrayRef(std::vector<T, Alloc>& v)
: array_(v.data()), size_(v.size()) {
@@ -89,7 +84,8 @@ class ArrayRef {
template <typename U, typename Alloc>
ArrayRef(const std::vector<U, Alloc>& v,
- typename std::enable_if<std::is_same<T, const U>::value, tag>::tag t = tag())
+ typename std::enable_if<std::is_same<T, const U>::value, tag>::tag
+ t ATTRIBUTE_UNUSED = tag())
: array_(v.data()), size_(v.size()) {
}