aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Adam Cozzette <acozzette@gmail.com>2018-07-06 14:56:25 -0700
committerGravatar GitHub <noreply@github.com>2018-07-06 14:56:25 -0700
commita651b77ffca5dae056e6d904c5d319cdd5146ecc (patch)
tree587dc0dbbdcc4dc3320544b92e0984a5c33c7f6c
parent79700b56b99fa5c8c22ddef78e6c9557ff711379 (diff)
parent8a1d02626fb206c656564fbd9837029ba09b69eb (diff)
Merge pull request #4872 from demon386/master
Fix SFINAE in 'RepeatedPtrFieldBase::Add'
-rw-r--r--src/google/protobuf/repeated_field.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/google/protobuf/repeated_field.h b/src/google/protobuf/repeated_field.h
index fbfbf942..79682b69 100644
--- a/src/google/protobuf/repeated_field.h
+++ b/src/google/protobuf/repeated_field.h
@@ -466,7 +466,7 @@ class LIBPROTOBUF_EXPORT RepeatedPtrFieldBase {
protected:
template <typename TypeHandler>
void Add(typename TypeHandler::Type&& value,
- std::enable_if<TypeHandler::Moveable>* dummy = NULL);
+ typename std::enable_if<TypeHandler::Moveable>::type* dummy = NULL);
template <typename TypeHandler>
void RemoveLast();
@@ -1541,7 +1541,7 @@ inline typename TypeHandler::Type* RepeatedPtrFieldBase::Add(
template <typename TypeHandler>
inline void RepeatedPtrFieldBase::Add(
typename TypeHandler::Type&& value,
- std::enable_if<TypeHandler::Moveable>*) {
+ typename std::enable_if<TypeHandler::Moveable>::type*) {
if (rep_ != NULL && current_size_ < rep_->allocated_size) {
*cast<TypeHandler>(rep_->elements[current_size_++]) = std::move(value);
return;