diff options
| author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-03-11 01:51:59 +0000 |
|---|---|---|
| committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-03-11 01:51:59 +0000 |
| commit | 3f01225910711e655faef56d694cf7c404d9ec35 (patch) | |
| tree | 4c922c198e69b52071e20c908358a0f09da2b218 /libstdc++-v3/include/std/complex | |
| parent | b40a963e15e2589eb250b4cf897d4c2210216ea3 (diff) | |
| download | ppe42-gcc-3f01225910711e655faef56d694cf7c404d9ec35.tar.gz ppe42-gcc-3f01225910711e655faef56d694cf7c404d9ec35.zip | |
2009-03-10 Paolo Carlini <paolo.carlini@oracle.com>
* include/std/complex (operator+(const complex<>&, const _Tp&),
operator+(const _Tp&, const complex<>&),
operator-(const complex<>&, const _Tp&),
operator-(const _Tp&, const complex<>&)): Do not assume real()
returns a reference (against DR 387).
* testsuite/26_numerics/complex/dr387_2.cc: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@144770 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/std/complex')
| -rw-r--r-- | libstdc++-v3/include/std/complex | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libstdc++-v3/include/std/complex b/libstdc++-v3/include/std/complex index ebde1a0a232..e5c583554c1 100644 --- a/libstdc++-v3/include/std/complex +++ b/libstdc++-v3/include/std/complex @@ -333,7 +333,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) operator+(const complex<_Tp>& __x, const _Tp& __y) { complex<_Tp> __r = __x; - __r.real() += __y; + __r += __y; return __r; } @@ -342,7 +342,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) operator+(const _Tp& __x, const complex<_Tp>& __y) { complex<_Tp> __r = __y; - __r.real() += __x; + __r += __x; return __r; } //@} @@ -363,7 +363,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) operator-(const complex<_Tp>& __x, const _Tp& __y) { complex<_Tp> __r = __x; - __r.real() -= __y; + __r -= __y; return __r; } @@ -372,7 +372,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) operator-(const _Tp& __x, const complex<_Tp>& __y) { complex<_Tp> __r(__x, -__y.imag()); - __r.real() -= __y.real(); + __r -= __y.real(); return __r; } //@} |

