[med-svn] [libhpptools] 01/03: Upstream patches from Git
Andreas Tille
tille at debian.org
Thu Sep 15 08:02:24 UTC 2016
This is an automated email from the git hooks/post-receive script.
tille pushed a commit to branch master
in repository libhpptools.
commit 25d84f1be1b066a360b503f82e8abe17a2a98758
Author: Andreas Tille <tille at debian.org>
Date: Wed Sep 14 14:05:55 2016 +0200
Upstream patches from Git
---
debian/patches/alg_hpp_from_git.patch | 125 ++++++++++++++++++++++++++++++++++
debian/patches/series | 3 +-
2 files changed, 127 insertions(+), 1 deletion(-)
diff --git a/debian/patches/alg_hpp_from_git.patch b/debian/patches/alg_hpp_from_git.patch
new file mode 100644
index 0000000..c0b7363
--- /dev/null
+++ b/debian/patches/alg_hpp_from_git.patch
@@ -0,0 +1,125 @@
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Tue, 13 Sep 2016 14:28:24 +0200
+Origin: https://github.com/mateidavid/hpptools
+Description: Upstream has some relevant changes in Git that are
+ needed to build nanocall successfully
+
+--- a/include/alg.hpp
++++ b/include/alg.hpp
+@@ -69,6 +69,8 @@
+
+ #include <algorithm>
+ #include <iostream>
++#include <iterator>
++#include <numeric>
+ #include <sstream>
+ #include <type_traits>
+
+@@ -290,13 +292,13 @@ min_of(Forward_Range&& rg, Unary_Functio
+ * @param fn Functor used to obtain key from value.
+ */
+ template < class Forward_Iterator, class Unary_Function = detail::Identity >
+-typename std::result_of< Unary_Function(typename Forward_Iterator::value_type) >::type
++typename std::result_of< Unary_Function(typename std::iterator_traits< Forward_Iterator >::value_type) >::type
+ min_value_of(Forward_Iterator first, Forward_Iterator last, Unary_Function&& fn = Unary_Function())
+ {
+ auto it = min_of(first, last, std::forward< Unary_Function >(fn));
+ return it != last
+ ? fn(*it)
+- : typename std::result_of< Unary_Function(typename Forward_Iterator::value_type) >::type();
++ : typename std::result_of< Unary_Function(typename std::iterator_traits< Forward_Iterator >::value_type) >::type();
+ }
+
+ /**
+@@ -307,7 +309,7 @@ min_value_of(Forward_Iterator first, For
+ template < class Forward_Range, class Unary_Function = detail::Identity >
+ auto
+ min_value_of(Forward_Range&& rg, Unary_Function&& fn = Unary_Function())
+- -> typename std::result_of< Unary_Function(typename decltype(rg.begin())::value_type) >::type
++ -> typename std::result_of< Unary_Function(typename std::iterator_traits< decltype(rg.begin()) >::value_type) >::type
+ {
+ return min_value_of(rg.begin(), rg.end(), std::forward< Unary_Function >(fn));
+ }
+@@ -357,13 +359,13 @@ max_of(Forward_Range&& rg, Unary_Functio
+ * @param fn Functor used to obtain key from value.
+ */
+ template < class Forward_Iterator, class Unary_Function = detail::Identity >
+-typename std::result_of< Unary_Function(typename Forward_Iterator::value_type) >::type
++typename std::result_of< Unary_Function(typename std::iterator_traits< Forward_Iterator >::value_type) >::type
+ max_value_of(Forward_Iterator first, Forward_Iterator last, Unary_Function&& fn = Unary_Function())
+ {
+ auto it = max_of(first, last, std::forward< Unary_Function >(fn));
+ return it != last
+ ? fn(*it)
+- : typename std::result_of< Unary_Function(typename Forward_Iterator::value_type) >::type();
++ : typename std::result_of< Unary_Function(typename std::iterator_traits< Forward_Iterator >::value_type) >::type();
+ }
+
+ /**
+@@ -374,7 +376,7 @@ max_value_of(Forward_Iterator first, For
+ template < class Forward_Range, class Unary_Function = detail::Identity >
+ auto
+ max_value_of(Forward_Range&& rg, Unary_Function&& fn = Unary_Function())
+- -> typename std::result_of< Unary_Function(typename decltype(rg.begin())::value_type) >::type
++ -> typename std::result_of< Unary_Function(typename std::iterator_traits< decltype(rg.begin()) >::value_type) >::type
+ {
+ return max_value_of(rg.begin(), rg.end(), std::forward< Unary_Function >(fn));
+ }
+@@ -428,15 +430,15 @@ minmax_of(Forward_Range&& rg, Unary_Func
+ * @param fn Functor used to obtain key from value.
+ */
+ template < class Forward_Iterator, class Unary_Function = detail::Identity >
+-std::pair< typename std::result_of< Unary_Function(typename Forward_Iterator::value_type) >::type,
+- typename std::result_of< Unary_Function(typename Forward_Iterator::value_type) >::type >
++std::pair< typename std::result_of< Unary_Function(typename std::iterator_traits< Forward_Iterator >::value_type) >::type,
++ typename std::result_of< Unary_Function(typename std::iterator_traits< Forward_Iterator >::value_type) >::type >
+ minmax_value_of(Forward_Iterator first, Forward_Iterator last, Unary_Function&& fn = Unary_Function())
+ {
+ auto p = minmax_of(first, last, std::forward< Unary_Function >(fn));
+ return p.first != last
+ ? std::make_pair(fn(*p.first), fn(*p.second))
+- : std::make_pair(typename std::result_of< Unary_Function(typename Forward_Iterator::value_type) >::type(),
+- typename std::result_of< Unary_Function(typename Forward_Iterator::value_type) >::type());
++ : std::make_pair(typename std::result_of< Unary_Function(typename std::iterator_traits< Forward_Iterator >::value_type) >::type(),
++ typename std::result_of< Unary_Function(typename std::iterator_traits< Forward_Iterator >::value_type) >::type());
+ }
+
+ /**
+@@ -447,8 +449,8 @@ minmax_value_of(Forward_Iterator first,
+ template < class Forward_Range, class Unary_Function = detail::Identity >
+ auto
+ minmax_value_of(Forward_Range&& rg, Unary_Function&& fn = Unary_Function())
+- -> std::pair< typename std::result_of< Unary_Function(typename decltype(rg.begin())::value_type) >::type,
+- typename std::result_of< Unary_Function(typename decltype(rg.begin())::value_type) >::type >
++ -> std::pair< typename std::result_of< Unary_Function(typename std::iterator_traits< decltype(rg.begin()) >::value_type) >::type,
++ typename std::result_of< Unary_Function(typename std::iterator_traits< decltype(rg.begin()) >::value_type) >::type >
+ {
+ return minmax_value_of(rg.begin(), rg.end(), std::forward< Unary_Function >(fn));
+ }
+@@ -624,13 +626,15 @@ g++ -std=c++11 -D SAMPLE_ALG -x c++ alg.
+ */
+
+ #include <vector>
++#include <array>
+
+ using namespace std;
+ using namespace alg;
+
+ int main()
+ {
+- vector< unsigned > v{ 42, 1, 15 };
++ array< array< unsigned, 3 >, 3 > v2 = {{ {{ 42, 1, 15 }}, {{1, 2, 3}}, {{4, 5, 6}} }};
++ array< unsigned, 3 >& v = v2[0];
+ cout << "v: " << os_join(v.begin(), v.end(), ", ") << endl;
+ cout << "v[0]: " << os_join(v.begin(), v.begin() + 1, ", ") << endl;
+ cout << "v+1: " << os_join(v.begin(), v.end(), ", ", [] (unsigned i) { return i + 1; }) << endl;
+@@ -639,6 +643,9 @@ int main()
+ cout << "u: " << os_join(vector< int >{ 5, 17, 6 }, ";") << endl;
+ string s = os_join(vector< char >{ 'a', 'b', 'c' }, "-");
+ cout << "s: " << s << endl;
++ cout << "min: " << min_value_of(v) << endl;
++ cout << "max: " << max_value_of(v) << endl;
++ cout << "minmax: " << minmax_value_of(v).first << "," << minmax_value_of(v).second << endl;
+ }
+
+ #endif
diff --git a/debian/patches/series b/debian/patches/series
index cadf9d0..c1316e0 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
-include_math_h.patch
+# include_math_h.patch
+alg_hpp_from_git.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/libhpptools.git
More information about the debian-med-commit
mailing list