public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "flast at flast dot jp" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/49022] New: [C++0x] std::begin and std::end specialized for std::valarray with some operators are missing. Date: Tue, 17 May 2011 13:49:00 -0000 [thread overview] Message-ID: <bug-49022-4@http.gcc.gnu.org/bugzilla/> (raw) 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>&)
next reply other threads:[~2011-05-17 13:42 UTC|newest] Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-05-17 13:49 flast at flast dot jp [this message] 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
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-49022-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).