From issues-return-1524-apmail-stdcxx-issues-archive=stdcxx.apache.org@stdcxx.apache.org Wed Apr 23 00:36:48 2008 Return-Path: Delivered-To: apmail-stdcxx-issues-archive@locus.apache.org Received: (qmail 47841 invoked from network); 23 Apr 2008 00:36:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Apr 2008 00:36:48 -0000 Received: (qmail 23237 invoked by uid 500); 23 Apr 2008 00:36:49 -0000 Delivered-To: apmail-stdcxx-issues-archive@stdcxx.apache.org Received: (qmail 23223 invoked by uid 500); 23 Apr 2008 00:36:49 -0000 Mailing-List: contact issues-help@stdcxx.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@stdcxx.apache.org Delivered-To: mailing list issues@stdcxx.apache.org Received: (qmail 23211 invoked by uid 99); 23 Apr 2008 00:36:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Apr 2008 17:36:49 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Apr 2008 00:36:04 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 1690E234C0F1 for ; Tue, 22 Apr 2008 17:33:22 -0700 (PDT) Message-ID: <1739002005.1208910802087.JavaMail.jira@brutus> Date: Tue, 22 Apr 2008 17:33:22 -0700 (PDT) From: "Martin Sebor (JIRA)" To: issues@stdcxx.apache.org Subject: [jira] Updated: (STDCXX-512) std::valarray computed assignment operators don't compile with a user-defined class MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/STDCXX-512?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Martin Sebor updated STDCXX-512: -------------------------------- Fix Version/s: (was: 4.2.1) 4.2.2 Disabled problematic tests again (see [r650706|http://svn.apache.org/viewvc?rev=650706&view=rev]) and deferred until 4.2.2. > std::valarray computed assignment operators don't compile with a user-defined class > ----------------------------------------------------------------------------------- > > Key: STDCXX-512 > URL: https://issues.apache.org/jira/browse/STDCXX-512 > Project: C++ Standard Library > Issue Type: Bug > Components: 26. Numerics > Affects Versions: 4.1.2, 4.1.3, 4.1.4 > Reporter: Martin Sebor > Assignee: Martin Sebor > Priority: Minor > Fix For: 4.2.2 > > Original Estimate: 4h > Remaining Estimate: 4h > > The program below fails to compile because the valarray computed assignment operators make use of operator@ (T, T) instead of the corresponding computed assignment operators defined by T (i.e., T::operator@(T)). > $ cat u.cpp && make u > #include > struct Value { > Value& operator*= (const Value&) { return *this; } > Value& operator/= (const Value&) { return *this; } > Value& operator+= (const Value&) { return *this; } > Value& operator-= (const Value&) { return *this; } > Value& operator%= (const Value&) { return *this; } > Value& operator^= (const Value&) { return *this; } > Value& operator&= (const Value&) { return *this; } > Value& operator|= (const Value&) { return *this; } > Value& operator<<= (const Value&) { return *this; } > Value& operator>>= (const Value&) { return *this; } > }; > int main () > { > std::valarray val; > val *= val; > val /= val; > val += val; > val -= val; > val %= val; > val ^= val; > val &= val; > val |= val; > val <<= val; > val >>= val; > } > gcc -c -I/amd/devco/sebor/stdcxx-4.1.3/include/ansi -D_RWSTDDEBUG -pthread -D_RWSTD_USE_CONFIG -I/build/sebor/stdcxx-4.1.3-gcc-3.4.3_6-15D/include -I/amd/devco/sebor/stdcxx-4.1.3/include -I/amd/devco/sebor/stdcxx-4.1.3/examples/include -pedantic -nostdinc++ -g -m64 -Wall -W -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long -Wcast-align u.cpp > /amd/devco/sebor/stdcxx-4.1.3/include/functional: In member function `typename std::binary_function<_TypeT, _TypeT, _TypeT>::result_type std::multiplies<_TypeT>::operator()(const typename std::binary_function<_TypeT, _TypeT, _TypeT>::first_argument_type&, const typename std::binary_function<_TypeT, _TypeT, _TypeT>::second_argument_type&) const [with _TypeT = Value]': > /amd/devco/sebor/stdcxx-4.1.3/include/algorithm:353: instantiated from `_OutputIter std::transform(_InputIter1, _InputIter1, _InputIter2, _OutputIter, _BinaryOperation) [with _InputIter1 = Value*, _InputIter2 = const Value*, _OutputIter = Value*, _BinaryOperation = std::multiplies]' > /amd/devco/sebor/stdcxx-4.1.3/include/valarray:363: instantiated from `std::valarray<_TypeT>& std::valarray<_TypeT>::operator*=(const std::valarray<_TypeT>&) [with _TypeT = Value]' > u.cpp:20: instantiated from here > /amd/devco/sebor/stdcxx-4.1.3/include/functional:83: error: no match for 'operator*' in '__x * __y' > /amd/devco/sebor/stdcxx-4.1.3/include/functional: In member function `typename std::binary_function<_TypeT, _TypeT, _TypeT>::result_type std::divides<_TypeT>::operator()(const typename std::binary_function<_TypeT, _TypeT, _TypeT>::first_argument_type&, const typename std::binary_function<_TypeT, _TypeT, _TypeT>::second_argument_type&) const [with _TypeT = Value]': > /amd/devco/sebor/stdcxx-4.1.3/include/algorithm:353: instantiated from `_OutputIter std::transform(_InputIter1, _InputIter1, _InputIter2, _OutputIter, _BinaryOperation) [with _InputIter1 = Value*, _InputIter2 = const Value*, _OutputIter = Value*, _BinaryOperation = std::divides]' > /amd/devco/sebor/stdcxx-4.1.3/include/valarray:376: instantiated from `std::valarray<_TypeT>& std::valarray<_TypeT>::operator/=(const std::valarray<_TypeT>&) [with _TypeT = Value]' > u.cpp:21: instantiated from here > /amd/devco/sebor/stdcxx-4.1.3/include/functional:96: error: no match for 'operator/' in '__x / __y' > /amd/devco/sebor/stdcxx-4.1.3/include/functional: In member function `typename std::binary_function<_TypeT, _TypeT, _TypeT>::result_type std::plus<_TypeT>::operator()(const typename std::binary_function<_TypeT, _TypeT, _TypeT>::first_argument_type&, const typename std::binary_function<_TypeT, _TypeT, _TypeT>::second_argument_type&) const [with _TypeT = Value]': > /amd/devco/sebor/stdcxx-4.1.3/include/algorithm:353: instantiated from `_OutputIter std::transform(_InputIter1, _InputIter1, _InputIter2, _OutputIter, _BinaryOperation) [with _InputIter1 = Value*, _InputIter2 = const Value*, _OutputIter = Value*, _BinaryOperation = std::plus]' > /amd/devco/sebor/stdcxx-4.1.3/include/valarray:389: instantiated from `std::valarray<_TypeT>& std::valarray<_TypeT>::operator+=(const std::valarray<_TypeT>&) [with _TypeT = Value]' > u.cpp:22: instantiated from here > /amd/devco/sebor/stdcxx-4.1.3/include/functional:57: error: no match for 'operator+' in '__x + __y' > /amd/devco/sebor/stdcxx-4.1.3/include/functional: In member function `typename std::binary_function<_TypeT, _TypeT, _TypeT>::result_type std::minus<_TypeT>::operator()(const typename std::binary_function<_TypeT, _TypeT, _TypeT>::first_argument_type&, const typename std::binary_function<_TypeT, _TypeT, _TypeT>::second_argument_type&) const [with _TypeT = Value]': > /amd/devco/sebor/stdcxx-4.1.3/include/algorithm:353: instantiated from `_OutputIter std::transform(_InputIter1, _InputIter1, _InputIter2, _OutputIter, _BinaryOperation) [with _InputIter1 = Value*, _InputIter2 = const Value*, _OutputIter = Value*, _BinaryOperation = std::minus]' > /amd/devco/sebor/stdcxx-4.1.3/include/valarray:402: instantiated from `std::valarray<_TypeT>& std::valarray<_TypeT>::operator-=(const std::valarray<_TypeT>&) [with _TypeT = Value]' > u.cpp:23: instantiated from here > /amd/devco/sebor/stdcxx-4.1.3/include/functional:70: error: no match for 'operator-' in '__x - __y' > /amd/devco/sebor/stdcxx-4.1.3/include/functional: In member function `typename std::binary_function<_TypeT, _TypeT, _TypeT>::result_type std::modulus<_TypeT>::operator()(const typename std::binary_function<_TypeT, _TypeT, _TypeT>::first_argument_type&, const typename std::binary_function<_TypeT, _TypeT, _TypeT>::second_argument_type&) const [with _TypeT = Value]': > /amd/devco/sebor/stdcxx-4.1.3/include/algorithm:353: instantiated from `_OutputIter std::transform(_InputIter1, _InputIter1, _InputIter2, _OutputIter, _BinaryOperation) [with _InputIter1 = Value*, _InputIter2 = const Value*, _OutputIter = Value*, _BinaryOperation = std::modulus]' > /amd/devco/sebor/stdcxx-4.1.3/include/valarray:415: instantiated from `std::valarray<_TypeT>& std::valarray<_TypeT>::operator%=(const std::valarray<_TypeT>&) [with _TypeT = Value]' > u.cpp:24: instantiated from here > /amd/devco/sebor/stdcxx-4.1.3/include/functional:109: error: no match for 'operator%' in '__x % __y' > /amd/devco/sebor/stdcxx-4.1.3/include/functional: In member function `typename std::binary_function<_TypeT, _TypeT, _TypeT>::result_type __rw::exclusive_or<_TypeT>::operator()(const typename std::binary_function<_TypeT, _TypeT, _TypeT>::first_argument_type&, const typename std::binary_function<_TypeT, _TypeT, _TypeT>::second_argument_type&) const [with _TypeT = Value]': > /amd/devco/sebor/stdcxx-4.1.3/include/algorithm:353: instantiated from `_OutputIter std::transform(_InputIter1, _InputIter1, _InputIter2, _OutputIter, _BinaryOperation) [with _InputIter1 = Value*, _InputIter2 = const Value*, _OutputIter = Value*, _BinaryOperation = __rw::exclusive_or]' > /amd/devco/sebor/stdcxx-4.1.3/include/valarray:428: instantiated from `std::valarray<_TypeT>& std::valarray<_TypeT>::operator^=(const std::valarray<_TypeT>&) [with _TypeT = Value]' > u.cpp:25: instantiated from here > /amd/devco/sebor/stdcxx-4.1.3/include/functional:732: error: no match for 'operator^' in '__x ^ __y' > /amd/devco/sebor/stdcxx-4.1.3/include/functional: In member function `typename std::binary_function<_TypeT, _TypeT, _TypeT>::result_type __rw::bitwise_and<_TypeT>::operator()(const typename std::binary_function<_TypeT, _TypeT, _TypeT>::first_argument_type&, const typename std::binary_function<_TypeT, _TypeT, _TypeT>::second_argument_type&) const [with _TypeT = Value]': > /amd/devco/sebor/stdcxx-4.1.3/include/algorithm:353: instantiated from `_OutputIter std::transform(_InputIter1, _InputIter1, _InputIter2, _OutputIter, _BinaryOperation) [with _InputIter1 = Value*, _InputIter2 = const Value*, _OutputIter = Value*, _BinaryOperation = __rw::bitwise_and]' > /amd/devco/sebor/stdcxx-4.1.3/include/valarray:441: instantiated from `std::valarray<_TypeT>& std::valarray<_TypeT>::operator&=(const std::valarray<_TypeT>&) [with _TypeT = Value]' > u.cpp:26: instantiated from here > /amd/devco/sebor/stdcxx-4.1.3/include/functional:719: error: no match for 'operator&' in '__x & __y' > /amd/devco/sebor/stdcxx-4.1.3/include/functional: In member function `typename std::binary_function<_TypeT, _TypeT, _TypeT>::result_type __rw::bitwise_or<_TypeT>::operator()(const typename std::binary_function<_TypeT, _TypeT, _TypeT>::first_argument_type&, const typename std::binary_function<_TypeT, _TypeT, _TypeT>::second_argument_type&) const [with _TypeT = Value]': > /amd/devco/sebor/stdcxx-4.1.3/include/algorithm:353: instantiated from `_OutputIter std::transform(_InputIter1, _InputIter1, _InputIter2, _OutputIter, _BinaryOperation) [with _InputIter1 = Value*, _InputIter2 = const Value*, _OutputIter = Value*, _BinaryOperation = __rw::bitwise_or]' > /amd/devco/sebor/stdcxx-4.1.3/include/valarray:454: instantiated from `std::valarray<_TypeT>& std::valarray<_TypeT>::operator|=(const std::valarray<_TypeT>&) [with _TypeT = Value]' > u.cpp:27: instantiated from here > /amd/devco/sebor/stdcxx-4.1.3/include/functional:706: error: no match for 'operator|' in '__x | __y' > /amd/devco/sebor/stdcxx-4.1.3/include/functional: In member function `typename std::binary_function<_TypeT, _TypeT, _TypeT>::result_type __rw::shift_left<_TypeT>::operator()(const typename std::binary_function<_TypeT, _TypeT, _TypeT>::first_argument_type&, const typename std::binary_function<_TypeT, _TypeT, _TypeT>::second_argument_type&) const [with _TypeT = Value]': > /amd/devco/sebor/stdcxx-4.1.3/include/algorithm:353: instantiated from `_OutputIter std::transform(_InputIter1, _InputIter1, _InputIter2, _OutputIter, _BinaryOperation) [with _InputIter1 = Value*, _InputIter2 = const Value*, _OutputIter = Value*, _BinaryOperation = __rw::shift_left]' > /amd/devco/sebor/stdcxx-4.1.3/include/valarray:467: instantiated from `std::valarray<_TypeT>& std::valarray<_TypeT>::operator<<=(const std::valarray<_TypeT>&) [with _TypeT = Value]' > u.cpp:28: instantiated from here > /amd/devco/sebor/stdcxx-4.1.3/include/functional:745: error: no match for 'operator<<' in '__x << __y' > /amd/devco/sebor/stdcxx-4.1.3/include/functional: In member function `typename std::binary_function<_TypeT, _TypeT, _TypeT>::result_type __rw::shift_right<_TypeT>::operator()(const typename std::binary_function<_TypeT, _TypeT, _TypeT>::first_argument_type&, const typename std::binary_function<_TypeT, _TypeT, _TypeT>::second_argument_type&) const [with _TypeT = Value]': > /amd/devco/sebor/stdcxx-4.1.3/include/algorithm:353: instantiated from `_OutputIter std::transform(_InputIter1, _InputIter1, _InputIter2, _OutputIter, _BinaryOperation) [with _InputIter1 = Value*, _InputIter2 = const Value*, _OutputIter = Value*, _BinaryOperation = __rw::shift_right]' > /amd/devco/sebor/stdcxx-4.1.3/include/valarray:480: instantiated from `std::valarray<_TypeT>& std::valarray<_TypeT>::operator>>=(const std::valarray<_TypeT>&) [with _TypeT = Value]' > u.cpp:29: instantiated from here > /amd/devco/sebor/stdcxx-4.1.3/include/functional:758: error: no match for 'operator>>' in '__x >> __y' > make: *** [u.o] Error 1 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.