I am able to compile below code with gcc on linux(v5+) but clang complains many things about when compiling
std::tuple(with dialect c++11 or above).
I have fixed some of them appending std before tuple<> usage, but still remains many error. What is wrong with clang?
Any help highly appreciated. Thanks.
napyonsen
-----------------------------------------------------
// this gives "expected expression" error
template<class T1, class T2> static ostream& operator << (
ostream& out, const std::tuple<T1, T2>& t) {
out << t.get<0>() << " " << t.get<1>();
return out;
}
-------------------------------------------------------------------
this gives "
no member named 'get' in 'std::__1::tuple<std::__1::basic_string<char>, std::__1::basic_string<char>,
int, int>' " error
void save_by_conns(vector<real_t>& container, const string& nam)
{
LOOP(const WC_CONN_PAIR& p, connections)
{
VDI begin = container.begin() + p.second.get<2>();
VDI end = container.begin() + p.second.get<3>();
if (begin != end)
{
save_range(make_pair(begin, end), p.second.get<1>() + "_" + nam);
}
}
}