|
Boost Users : |
Subject: Re: [Boost-users] zip_iterator.hpp / boost::tuple requires a using namespace std!
From: mark pashley (mark.pashley_at_[hidden])
Date: 2012-02-29 15:36:04
Hi Lars,
I used nabble.com to pre-format the message, I guess that the pre-formatting
is corrupted when sent out to end user's of the list. ...
The gist of the problem is that the following template does not compile
without the "using namespace std" statement:
template <class T>
struct MapZipHelperImpl
{
typedef typename boost::tuple< const T&, const T& > iter_value_type;
void operator()( const iter_value_type& iter_value )
{
using namespace std; // without this the next line does not
compile!
typename T::first_type val = iter_value.get<0>().first ;
}
};
The error is:
error: expected primary-expression before â)â token
I believe that the "using namespace std;" statement should not be necessary.
Is it possible that a header file is missing a std:: qualification and
in-advertantly depending on client code to include the "using namespace
std;" statement?
It took a t of effort to simplify the code that was causing the problem and
produce a minimal example.
-- View this message in context: http://boost.2283326.n4.nabble.com/zip-iterator-hpp-boost-tuple-requires-a-using-namespace-std-tp4432441p4432879.html Sent from the Boost - Users mailing list archive at Nabble.com.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net