void-packages/srcpkgs/zinnia/patches/Fix-compile-error-of-std-ma...

40 lines
1.1 KiB
Diff

From b49a0187e74ff619f28fb20e2b5ecfec1d437d6f Mon Sep 17 00:00:00 2001
From: Yohei Yukawa <yukawa@google.com>
Date: Sat, 5 Sep 2015 02:06:05 -0700
Subject: [PATCH] Fix compile error of std::make_pair in C++11
std::make_pair is not designed to be used with explicit type
parameters. In practice doing that can result in compile error
with Clang 3.4 on Ubuntu 14.04 when C++11 is enabled.
This CL removes explicit type parameters so that Zinnia can be
built even if C++11 is enabled.
---
AUTHORS | 1 +
trainer.cpp | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/AUTHORS b/AUTHORS
index a44e82c..fa52d6a 100644
--- AUTHORS
+++ AUTHORS
@@ -1 +1,2 @@
Taku Kudo <taku@chasen.org>
+Google Inc. <*@google.com>
diff --git a/trainer.cpp b/trainer.cpp
index a889bc7..84230b0 100644
--- trainer.cpp
+++ trainer.cpp
@@ -104,7 +104,7 @@ class TrainerImpl: public Trainer {
if (!fn) {
return false;
}
- x_.push_back(std::make_pair<std::string, FeatureNode *>(y, fn));
+ x_.push_back(std::make_pair(y, fn));
return true;
}
--
2.14.1