]> git.pld-linux.org Git - packages/hugin.git/blob - hugin-boost.patch
- updated gettext BR
[packages/hugin.git] / hugin-boost.patch
1 --- hugin-2013.0.0.old/src/tools/ParseExp.cpp   2013-10-27 10:19:02.000000000 +0100
2 +++ hugin-2013.0.0/src/tools/ParseExp.cpp       2014-09-12 01:41:15.468973470 +0200
3 @@ -50,37 +50,45 @@
4  //power function\r
5  struct lazy_pow_\r
6  {\r
7 -    template <typename X, typename Y>\r
8 -    struct result { typedef X type; };\r
9 +    template<class> struct result;\r
10 +\r
11 +    template <typename F, typename X, typename Y>\r
12 +    struct result<F(X,Y)> { typedef X& type; };\r
13  \r
14      template <typename X, typename Y>\r
15 -    X operator()(X x, Y y) const\r
16 +    X& operator()(X& x, Y y) const\r
17      {\r
18 -        return std::pow(x, y);\r
19 +        x= std::pow(x, y);\r
20 +        return x;\r
21      }\r
22  };\r
23  \r
24  // modulus for double values\r
25  struct lazy_mod_\r
26  {\r
27 -    template <typename X, typename Y>\r
28 -    struct result { typedef X type; };\r
29 +    template<class> struct result;\r
30 +\r
31 +    template <typename F, typename X, typename Y>\r
32 +    struct result<F(X,Y)> { typedef X& type; };\r
33  \r
34      template <typename X, typename Y>\r
35 -    X operator()(X x, Y y) const\r
36 +    X& operator()(X& x, Y y) const\r
37      {\r
38 -        return std::fmod(x,y);\r
39 +        x= std::fmod(x,y);\r
40 +        return x;\r
41      }\r
42  };\r
43  \r
44  // if statement\r
45  struct lazy_if_\r
46  {\r
47 -    template <typename X, typename Y, typename Z>\r
48 -    struct result { typedef Y type; };\r
49 +    template<class> struct result;\r
50  \r
51 -    template <typename X, typename Y, typename Z>\r
52 -    X operator()(X x, Y y, Z z) const\r
53 +    template <typename F, typename X, typename Y>\r
54 +    struct result<F(X,Y,Y)> { typedef Y& type; };\r
55 +\r
56 +    template <typename X, typename Y>\r
57 +    Y& operator()(X x, Y& y, Y& z) const\r
58      {\r
59          return x ? y : z;\r
60      }\r
61 @@ -89,13 +97,16 @@
62  // wrapper for unary function\r
63  struct lazy_ufunc_\r
64  {\r
65 -    template <typename F, typename A1>\r
66 -    struct result { typedef A1 type; };\r
67 +    template<class> struct result;\r
68 +\r
69 +    template<typename F, typename F1, typename A1>\r
70 +    struct result<F(F1,A1)> { typedef A1& type; };\r
71  \r
72      template <typename F, typename A1>\r
73 -    A1 operator()(F f, A1 a1) const\r
74 +    A1& operator()(F f, A1& a1) const\r
75      {\r
76 -        return f(a1);\r
77 +        a1= f(a1);\r
78 +        return a1;\r
79      }\r
80  };\r
81  \r
This page took 0.025478 seconds and 3 git commands to generate.