Problems with mpl::find and std library
I had a problem with using mpl::find and the std::find at the same time. Basically, my compiler, Compaq C++ V6.5-026, notes an ambiguity in find.hpp between the find_if that it uses and the find_if in the STL. I changed the line that reads struct find : find_if< Sequence, same_as<T> > {}; to be struct find : mpl::find_if< Sequence, same_as<T> > {}; and it works fine. I'm not sure if this is a compiler bug or if we need to find other occurences like this one and fix them. Any help is appreciated. Tanton
From: Tanton Gibbs I had a problem with using mpl::find and the std::find at the same time. Basically, my compiler, Compaq C++ V6.5-026, notes an ambiguity in find.hpp between the find_if that it uses and the find_if in the STL. I changed the line that reads struct find : find_if< Sequence, same_as<T> > {}; to be struct find : mpl::find_if< Sequence, same_as<T> > {}; and it works fine. I'm not sure if this is a compiler bug or if we need to find other occurences like this one and fix them. It shouldn't find std::find and std::find_if, unless they have been pulled in by a "using" declatation or directive. Could it be that you have that _before_ the MPL #include's? In that case, you should make sure that any such declaration/directive, in the global namespace, doesn't occur until after all #include's, for cpp-files, and not at all in header files. Regards, Terje [Non-text portions of this message have been removed]
From: Tanton Gibbs
I had a problem with using mpl::find and the std::find at the same time. Basically, my compiler, Compaq C++ V6.5-026, notes an ambiguity in find.hpp between the find_if that it uses and the find_if in the STL. I changed
Nope, the only using I have is
using std::string;
The only thing I can imagine is a non standard conformant compiler. I was
just checking that this was the case.
Tanton
----- Original Message -----
From: "Terje Slettebø"
line that reads
struct find : find_if< Sequence, same_as<T> > {};
to be struct find : mpl::find_if< Sequence, same_as<T> > {};
and it works fine. I'm not sure if this is a compiler bug or if we need to find other occurences like this one and fix them. It shouldn't find std::find and std::find_if, unless they have been pulled in by a "using" declatation or directive. Could it be that you have that _before_ the MPL #include's? In that case, you should make sure that any such declaration/directive, in the global namespace, doesn't occur until after all #include's, for cpp-files, and not at all in header files.
Regards,
Terje
[Non-text portions of this message have been removed]
Info: http://www.boost.org Wiki: http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl Unsubscribe: mailto:boost-users-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
participants (2)
-
Tanton Gibbs
-
Terje Slettebø