1 | #6511: Division by scalar should use enable_if<>
|
---|
2 | ------------------------------------------------+---------------------------
|
---|
3 | Reporter: Sean Reilly <campreilly@
|
---|
4 | > | Owner: guwi17
|
---|
5 | Type: Bugs | Status: new
|
---|
6 | Milestone: To Be Determined | Component: uBLAS
|
---|
7 | Version: Boost 1.48.0 | Severity: Problem
|
---|
8 | Keywords: |
|
---|
9 | ------------------------------------------------+---------------------------
|
---|
10 | file: vector_expression.hpp lines 1409 through 1417
|
---|
11 | function: operator/( vector, scalar)
|
---|
12 |
|
---|
13 | Should be using the enable_if<> macros just like the operator*() in lines
|
---|
14 | 1397 through 1407 (just above it). Doing so allows further overloading of
|
---|
15 | operator/() for other types. Suggested change is...
|
---|
16 |
|
---|
17 | Before:
|
---|
18 | {{{
|
---|
19 | #!python
|
---|
20 | // (v / t) [i] = v [i] / t
|
---|
21 | template<class E1, class T2>
|
---|
22 | BOOST_UBLAS_INLINE
|
---|
23 | typename vector_binary_scalar2_traits<E1, const T2,
|
---|
24 | scalar_divides<typename E1::value_type, T2> >::result_type
|
---|
25 | operator / (const vector_expression<E1> &e1,
|
---|
26 | const T2 &e2) {
|
---|
27 | typedef typename vector_binary_scalar2_traits<E1, const T2,
|
---|
28 | scalar_divides<typename E1::value_type, T2> >::expression_type
|
---|
29 | expression_type;
|
---|
30 | return expression_type (e1 (), e2);
|
---|
31 | }
|
---|
32 | }}}
|
---|
33 |
|
---|
34 | After:
|
---|
35 |
|
---|
36 | {{{
|
---|
37 | #!python
|
---|
38 | // (v / t) [i] = v [i] / t
|
---|
39 | template<class E1, class T2>
|
---|
40 | BOOST_UBLAS_INLINE
|
---|
41 | typename enable_if< is_convertible<T2, typename E1::value_type >,
|
---|
42 | typename vector_binary_scalar2_traits<E1, const T2,
|
---|
43 | scalar_multiplies<typename E1::value_type, T2> >::result_type
|
---|
44 | >::type
|
---|
45 | typename vector_binary_scalar2_traits<E1, const T2,
|
---|
46 | scalar_divides<typename E1::value_type, T2> >::result_type
|
---|
47 | operator / (const vector_expression<E1> &e1,
|
---|
48 | const T2 &e2) {
|
---|
49 | typedef typename vector_binary_scalar2_traits<E1, const T2,
|
---|
50 | scalar_divides<typename E1::value_type, T2> >::expression_type
|
---|
51 | expression_type;
|
---|
52 | return expression_type (e1 (), e2);
|
---|
53 | }
|
---|
54 | }}}
|
---|
55 |
|
---|
56 |
|
---|
57 | Boost C++ Libraries <noreply@lists.boost.org>
|
---|
58 | 8/27/12
|
---|
59 | Send to Evernote
|
---|
60 | to boost-bugs
|
---|
61 | #6511: Division by scalar should use enable_if<>
|
---|
62 | -------------------------------------------------+--------------------------
|
---|
63 | Reporter: Sean Reilly <campreilly@
|
---|
64 | > | Owner: guwi17
|
---|
65 | Type: Bugs | Status: new
|
---|
66 | Milestone: To Be Determined | Component: uBLAS
|
---|
67 | Version: Boost 1.48.0 | Severity: Problem
|
---|
68 | Resolution: | Keywords:
|
---|
69 | -------------------------------------------------+--------------------------
|
---|
70 |
|
---|
71 | Comment (by guwi17):
|
---|
72 |
|
---|
73 | (In [80270])
|
---|
74 | boost/numeric/ublas/vector_expression.hpp - use enable_if for
|
---|
75 | operator/(vector, scalar), see #6511
|
---|
76 |
|
---|
77 |
|
---|
78 | Boost C++ Libraries <noreply@lists.boost.org>
|
---|
79 | 9/16/12
|
---|
80 | Send to Evernote
|
---|
81 | to boost-bugs
|
---|
82 | #6511: Division by scalar should use enable_if<>
|
---|
83 | -------------------------------------------------+--------------------------
|
---|
84 | Reporter: Sean Reilly <campreilly@
|
---|
85 | > | Owner: guwi17
|
---|
86 | Type: Bugs | Status: assigned
|
---|
87 | Milestone: To Be Determined | Component: uBLAS
|
---|
88 | Version: Boost 1.52.0 | Severity: Problem
|
---|
89 | Resolution: | Keywords:
|
---|
90 | -------------------------------------------------+--------------------------
|
---|
91 | Changes (by guwi17):
|
---|
92 |
|
---|
93 | * status: new => assigned
|
---|
94 | * version: Boost 1.48.0 => Boost 1.52.0
|
---|
95 |
|
---|
96 |
|
---|
97 | Boost C++ Libraries <noreply@lists.boost.org>
|
---|
98 | 9/16/12
|
---|
99 | Send to Evernote
|
---|
100 | to boost-bugs
|
---|
101 | #6511: Division by scalar should use enable_if<>
|
---|
102 | -------------------------------------------------+--------------------------
|
---|
103 | Reporter: Sean Reilly <campreilly@
|
---|
104 | > | Owner: guwi17
|
---|
105 | Type: Bugs | Status: assigned
|
---|
106 | Milestone: Boost 1.52.0 | Component: uBLAS
|
---|
107 | Version: Boost 1.48.0 | Severity: Problem
|
---|
108 | Resolution: | Keywords:
|
---|
109 | -------------------------------------------------+--------------------------
|
---|
110 | Changes (by guwi17):
|
---|
111 |
|
---|
112 | * version: Boost 1.52.0 => Boost 1.48.0
|
---|
113 | * milestone: To Be Determined => Boost 1.52.0
|
---|
114 |
|
---|
115 |
|
---|
116 | Comment:
|
---|
117 |
|
---|
118 | updated wrong field ^^
|
---|
119 |
|
---|
120 |
|
---|
121 | Boost C++ Libraries <noreply@lists.boost.org>
|
---|
122 | 9/18/12
|
---|
123 | Send to Evernote
|
---|
124 | to boost-bugs
|
---|
125 | #6511: Division by scalar should use enable_if<>
|
---|
126 | -------------------------------------------------+--------------------------
|
---|
127 | Reporter: Sean Reilly <campreilly@
|
---|
128 | > | Owner: guwi17
|
---|
129 | Type: Bugs | Status: closed
|
---|
130 | Milestone: Boost 1.52.0 | Component: uBLAS
|
---|
131 | Version: Boost 1.48.0 | Severity: Problem
|
---|
132 | Resolution: fixed | Keywords:
|
---|
133 | -------------------------------------------------+--------------------------
|
---|
134 | Changes (by guwi17):
|
---|
135 |
|
---|
136 | * status: assigned => closed
|
---|
137 | * resolution: => fixed
|
---|
138 |
|
---|
139 |
|
---|
140 | Comment:
|
---|
141 |
|
---|
142 | (In [80588]) merge
|
---|
143 | [61880],[75560],[80267],[80268],[80269],[80270],[80399],[80403],[80483],[80485],[80507],[80563]
|
---|
144 | into release branch
|
---|
145 |
|
---|
146 | * fix #6511, fix #6514, fix #7296, fix #7297,
|
---|
147 |
|
---|
148 | * see #4024
|
---|
149 |
|
---|
150 |
|
---|
151 | Boost C++ Libraries <noreply@lists.boost.org>
|
---|
152 | 12/30/12
|
---|
153 | Send to Evernote
|
---|
154 | to boost-bugs
|
---|
155 | #6511: Division by scalar should use enable_if<>
|
---|
156 | -------------------------------------------------+--------------------------
|
---|
157 | Reporter: Sean Reilly <campreilly@
|
---|
158 | > | Owner: guwi17
|
---|
159 | Type: Bugs | Status: closed
|
---|
160 | Milestone: Boost 1.52.0 | Component: uBLAS
|
---|
161 | Version: Boost 1.48.0 | Severity: Problem
|
---|
162 | Resolution: fixed | Keywords:
|
---|
163 | -------------------------------------------------+--------------------------
|
---|
164 |
|
---|
165 | Comment (by Sean Reilly <campreilly@
|
---|
166 | >):
|
---|
167 |
|
---|
168 | Sorry to do this to you after the ticket has already closed...
|
---|
169 |
|
---|
170 | But, did you happen to make the corresponding change to
|
---|
171 | matrix_expression.hpp?
|
---|
172 |
|
---|
173 |
|
---|
174 | Boost C++ Libraries <noreply@lists.boost.org>
|
---|
175 | Jan 4 (13 days ago)
|
---|
176 | Send to Evernote
|
---|
177 | to boost-bugs
|
---|
178 | #6511: Division by scalar should use enable_if<>
|
---|
179 | -------------------------------------------------+--------------------------
|
---|
180 | Reporter: Sean Reilly <campreilly@
|
---|
181 | > | Owner: guwi17
|
---|
182 | Type: Bugs | Status: closed
|
---|
183 | Milestone: Boost 1.52.0 | Component: uBLAS
|
---|
184 | Version: Boost 1.48.0 | Severity: Problem
|
---|
185 | Resolution: fixed | Keywords:
|
---|
186 | -------------------------------------------------+--------------------------
|
---|
187 |
|
---|
188 | Comment (by guwi17):
|
---|
189 |
|
---|
190 | Replying to [comment:5 Sean Reilly <campreilly@
|
---|
191 | >]:
|
---|
192 | > But, did you happen to make the corresponding change to
|
---|
193 | matrix_expression.hpp?
|
---|
194 |
|
---|
195 | No, only vector_expression has been patched for this ticket.
|
---|
196 |
|
---|