Opened 12 years ago
Closed 12 years ago
#4495 closed Bugs (invalid)
Including dynamic_bitset while using BGL's boost::dynamic_properties forces operator>> into std namespace
Reported by: | Owned by: | Gennaro Prota | |
---|---|---|---|
Milestone: | Boost 1.44.0 | Component: | dynamic_bitset |
Version: | Boost 1.43.0 | Severity: | Problem |
Keywords: | Cc: | ghionna@…, dao@… |
Description
Including dynamic_bitset.hpp
(without using it) breaks previously working BGL code, which uses boost::dynamic_properties
. We get the following error:
/opt/local/include/boost/lexical_cast.hpp:785: error: no match for 'operator>>' in 'stream >> output'
Wrapping my operator>>
into namespace std
fixes the compiler error.
I've created a rather "minimal" example which should confirm this (simply run g++ XXX.cpp
):
xxx.cpp
: this is the version without dynamic_bitset and compilesyyy.cpp
: a variant ofxxx.cpp
which includes dynamic_bitset; gives above compiler errorzzz.cpp
: this is a variant ofyyy.cpp
which compiles again
The problem can be reproduced in Boost 1.43.0 and in Boost trunk.
Attachments (3)
Change History (4)
by , 12 years ago
comment:1 by , 12 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
yyy.cpp is incorrect. operator>> cannot be found by Argument Dependent Lookup. xxx.cpp only works because gcc doesn't implement two-phase name lookup perfectly.
Working example without dynamic_bitset