Hello,
The following code, which compiles just fine with g++ 4.4 without the --std=c++0x flag,
gives an error with that flag:
#include <string>
#include
#include
using boost::make_tuple;
void f(int i, const std::string& s)
{
boost::tuple t;
t = make_tuple(i, s);
}
test.cpp: In function ‘void f(int, const std::string&)’:
test.cpp:12: error: no match for ‘operator=’ in ‘t = std::make_tuple(_Elements&& ...) [with _Elements = int&, const std::basic_string&](((const std::basic_string&)((const std::string*)s)))’
Note that any one of the following makes the code compile:
1) Removing the --std=c++0x flag
2) Removing the include
3) Removing the using boost::make_tuple declaration and explciitly qualifying boost::make_tuple in f().
What is going on?
Thanks,
Nate.
_________________________________________________________________
Learn more ways to connect with your buddies now
http://go.microsoft.com/?linkid=9734388