public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/33486]  New: parallel v3: functions not in right namespace
@ 2007-09-19  2:34 bangerth at dealii dot org
  2007-09-19 17:05 ` [Bug libstdc++/33486] " bkoz at gcc dot gnu dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: bangerth at dealii dot org @ 2007-09-19  2:34 UTC (permalink / raw)
  To: gcc-bugs

The following three programs compile just fine in normal mode, but
don't in parallel mode:
--------------------
#include <algorithm>
#include <set>
void f () {
  std::set<int> boundary_indicators;
  find (boundary_indicators.begin(), boundary_indicators.end(), 1);
}
--------------------
#include <algorithm>
#include <vector>
void f () {
  std::vector<int> boundary_indicators;
  sort (boundary_indicators.begin(), boundary_indicators.end());
}
-------------------
#include <algorithm>
#include <vector>
int negate (int i) { return -i; }
void f () {
  std::vector<int> boundary_indicators;
  transform (boundary_indicators.begin(), boundary_indicators.end(),
             boundary_indicators.begin(),
             &negate);
}
--------------------
The reason is that, unlike in normal mode, the functions find, sort, and 
transform are not in the namespaces of one of the arguments, and are therefore
not found using Koenig lookup.

I consider the question whether the standard mandates that these programs
need to compile at all of secondary interest, since parallel mode should be
a drop-in replacement that can be compiled with the same user code base. As
one data point, above programs have been extracted from a code base that
has compiled just fine with about half a dozen compilers for several years
now, so this is probably pretty common.


-- 
           Summary: parallel v3: functions not in right namespace
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bangerth at dealii dot org


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


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

end of thread, other threads:[~2008-04-23 16:41 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-19  2:34 [Bug libstdc++/33486] New: parallel v3: functions not in right namespace bangerth at dealii dot org
2007-09-19 17:05 ` [Bug libstdc++/33486] " bkoz at gcc dot gnu dot org
2007-10-10  1:07 ` bangerth at dealii dot org
2008-01-21 15:23 ` singler at gcc dot gnu dot org
2008-01-21 22:12 ` bangerth at dealii dot org
2008-02-25  2:04 ` [Bug c++/33486] namespace association doesn't handle parallel namespaces jason at gcc dot gnu dot org
2008-02-25  6:27 ` jason at gcc dot gnu dot org
2008-04-01 19:34 ` bkoz at gcc dot gnu dot org
2008-04-07 17:29 ` jason at redhat dot com
2008-04-11 17:32 ` bkoz at gcc dot gnu dot org
2008-04-18 19:58 ` jason at gcc dot gnu dot org
2008-04-23 16:41 ` bkoz at gcc dot gnu dot 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).