void-packages/srcpkgs/zinnia/patches/Fix-compile-error-of-std-make_pair-in-C-11.patch
Đoàn Trần Công Danh e2a21ccfd6 srcpkgs/z*: convert patches to -Np1
```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.-][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.-][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

39 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
--- a/AUTHORS
+++ b/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
--- a/trainer.cpp
+++ b/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