public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/49022] New: [C++0x] std::begin and std::end specialized for std::valarray with some operators are missing.
@ 2011-05-17 13:49 flast at flast dot jp
  2011-05-17 14:09 ` [Bug libstdc++/49022] " redi at gcc dot gnu.org
                   ` (30 more replies)
  0 siblings, 31 replies; 32+ messages in thread
From: flast at flast dot jp @ 2011-05-17 13:49 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49022

           Summary: [C++0x] std::begin and std::end specialized for
                    std::valarray with some operators are missing.
           Product: gcc
           Version: 4.6.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: flast@flast.jp


Currently, std::begin and std::end specialized for std::valarray are exist.
However operators for std::valarray are using Expression Template technique.
And std::begin and std::end specialized for those are not exist.

For example, GCC rejects following code.
==== testcase.cc ====
#include <valarray>

void f()
{
    std::valarray<int> x,y;
    std::begin(x + y);
}
====

output:
$ g++-4.6 -std=c++0x testcase.cc
testcase.cc: In function 'void f()':
testcase.cc:6:23: error: no matching function for call to
'begin(std::_Expr<std::_BinClos<std::__plus, std::_ValArray, std::_ValArray,
int, int>, int>)'
testcase.cc:6:23: note: candidates are:
/usr/local/lib/gcc/i686-pc-linux-gnu/4.6.1/../../../../include/c++/4.6.1/initializer_list:86:38:
note: template<class _Tp> constexpr const _Tp*
std::begin(std::initializer_list<_Tp>)
/usr/local/lib/gcc/i686-pc-linux-gnu/4.6.1/../../../../include/c++/4.6.1/bits/range_access.h:48:57:
note: template<class _Container> decltype (__cont->begin())
std::begin(_Container&)
/usr/local/lib/gcc/i686-pc-linux-gnu/4.6.1/../../../../include/c++/4.6.1/bits/range_access.h:58:63:
note: template<class _Container> decltype (__cont->begin()) std::begin(const
_Container&)
/usr/local/lib/gcc/i686-pc-linux-gnu/4.6.1/../../../../include/c++/4.6.1/bits/range_access.h:87:28:
note: template<class _Tp, unsigned int _Nm> _Tp* std::begin(_Tp (&)[_Nm])
/usr/local/lib/gcc/i686-pc-linux-gnu/4.6.1/../../../../include/c++/4.6.1/valarray:1126:30:
note: template<class _Tp> _Tp* std::begin(std::valarray<_Tp>&)
/usr/local/lib/gcc/i686-pc-linux-gnu/4.6.1/../../../../include/c++/4.6.1/valarray:1136:36:
note: template<class _Tp> const _Tp* std::begin(const std::valarray<_Tp>&)


^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2013-07-04 23:18 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-17 13:49 [Bug libstdc++/49022] New: [C++0x] std::begin and std::end specialized for std::valarray with some operators are missing flast at flast dot jp
2011-05-17 14:09 ` [Bug libstdc++/49022] " redi at gcc dot gnu.org
2011-05-17 15:00 ` paolo.carlini at oracle dot com
2011-05-17 15:06 ` paolo.carlini at oracle dot com
2011-05-17 15:13 ` redi at gcc dot gnu.org
2011-05-17 15:23 ` paolo.carlini at oracle dot com
2011-05-17 15:30 ` paolo.carlini at oracle dot com
2011-05-17 15:33 ` gdr at gcc dot gnu.org
2011-05-17 15:40 ` gdr at gcc dot gnu.org
2011-05-17 15:41 ` paolo.carlini at oracle dot com
2011-05-17 16:06 ` redi at gcc dot gnu.org
2011-05-17 16:07 ` paolo.carlini at oracle dot com
2011-05-17 16:08 ` paolo.carlini at oracle dot com
2011-05-17 16:49 ` gdr at gcc dot gnu.org
2011-05-17 17:16 ` gdr at gcc dot gnu.org
2011-05-17 17:26 ` paolo.carlini at oracle dot com
2011-05-18  9:22 ` paolo.carlini at oracle dot com
2011-06-14 12:06 ` [Bug libstdc++/49022] [C++0x][DR 2058] " paolo.carlini at oracle dot com
2011-06-14 12:20 ` daniel.kruegler at googlemail dot com
2011-06-14 12:52 ` redi at gcc dot gnu.org
2011-06-14 13:02 ` redi at gcc dot gnu.org
2011-06-14 13:23 ` paolo.carlini at oracle dot com
2011-06-14 13:23 ` paolo.carlini at oracle dot com
2011-06-14 13:27 ` paolo.carlini at oracle dot com
2011-06-14 13:53 ` paolo.carlini at oracle dot com
2011-06-14 13:54 ` gdr at gcc dot gnu.org
2011-06-14 14:05 ` gdr at gcc dot gnu.org
2011-06-14 14:06 ` paolo.carlini at oracle dot com
2013-07-04 11:34 ` paolo.carlini at oracle dot com
2013-07-04 11:45 ` daniel.kruegler at googlemail dot com
2013-07-04 12:13 ` paolo.carlini at oracle dot com
2013-07-04 23:18 ` gdr at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).