block_collect.cpp:229:17: error: ‘abs’ is not a member of ‘__gnu_cxx’
if (__gnu_cxx::abs(info_.version_ - info.version_) <= VERSION_AGREED_MASK)//version agreed
^
block_collect.cpp:229:17: note: suggested alternatives:
In file included from /usr/include/c++/4.8/cstdlib:72:0,
from /usr/include/c++/4.8/bits/stl_algo.h:59,
from /usr/include/c++/4.8/algorithm:62,
from /usr/include/c++/4.8/backward/hashtable.h:64,
from /usr/include/c++/4.8/ext/hash_map:64,
from /home/hadoop/wrp/TES_test/tb-common-utils/include/tbsys/config.h:20,
from /home/hadoop/wrp/TES_test/tb-common-utils/include/tbsys/tbsys.h:110,
from block_collect.cpp:16:
/usr/include/stdlib.h:775:12: note: ‘abs’
extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
^
In file included from /usr/include/c++/4.8/bits/stl_algo.h:59:0,
from /usr/include/c++/4.8/algorithm:62,
from /usr/include/c++/4.8/backward/hashtable.h:64,
from /usr/include/c++/4.8/ext/hash_map:64,
from /home/hadoop/wrp/TES_test/tb-common-utils/include/tbsys/config.h:20,
from /home/hadoop/wrp/TES_test/tb-common-utils/include/tbsys/tbsys.h:110,
from block_collect.cpp:16:
/usr/include/c++/4.8/cstdlib:179:3: note: ‘std::abs’
abs(__int128 __x) { return __x >= 0 ? __x : -__x; }
client_request_server.cpp: In member function ‘int tfs::nameserver::ClientRequestServer::batch_open(const VUINT32&, int32_t, int32_t, std::map<unsigned int, tfs::common::BlockInfoSeg>&)’:
client_request_server.cpp:160:56: error: call of overloaded ‘abs(std::map<unsigned int, tfs::common::BlockInfoSeg>::size_type)’ is ambiguous
stat[1] = std::abs(out.size() - blocks.size());
^
client_request_server.cpp:160:56: note: candidates are:
In file included from /usr/include/c++/4.8/cstdlib:72:0,
from /usr/include/c++/4.8/bits/stl_algo.h:59,
from /usr/include/c++/4.8/algorithm:62,
from /usr/include/c++/4.8/backward/hashtable.h:64,
from /usr/include/c++/4.8/ext/hash_map:64,
from /home/hadoop/wrp/TES_test/tb-common-utils/include/tbsys/config.h:20,
from /home/hadoop/wrp/TES_test/tb-common-utils/include/tbsys/tbsys.h:110,
from client_request_server.cpp:18:
/usr/include/stdlib.h:775:12: note: int abs(int)
extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
^
In file included from /usr/include/c++/4.8/bits/stl_algo.h:59:0,
from /usr/include/c++/4.8/algorithm:62,
from /usr/include/c++/4.8/backward/hashtable.h:64,
from /usr/include/c++/4.8/ext/hash_map:64,
from /home/hadoop/wrp/TES_test/tb-common-utils/include/tbsys/config.h:20,
from /home/hadoop/wrp/TES_test/tb-common-utils/include/tbsys/tbsys.h:110,
from client_request_server.cpp:18:
/usr/include/c++/4.8/cstdlib:166:3: note: long int std::abs(long int)
abs(long __i) { return __builtin_labs(__i); }
^
/usr/include/c++/4.8/cstdlib:174:3: note: long long int std::abs(long long int)
abs(long long __x) { return __builtin_llabs (__x); }
^
/usr/include/c++/4.8/cstdlib:179:3: note: __int128 std::abs(__int128)
abs(__int128 __x) { return __x >= 0 ? __x : -__x; }
^
client_request_server.cpp:167:54: error: call of overloaded ‘abs(std::map<unsigned int, tfs::common::BlockInfoSeg>::size_type)’ is ambiguous
stat[3] = std::abs(out.size() - block_count);
^
client_request_server.cpp:167:54: note: candidates are:
In file included from /usr/include/c++/4.8/cstdlib:72:0,
from /usr/include/c++/4.8/bits/stl_algo.h:59,
from /usr/include/c++/4.8/algorithm:62,
from /usr/include/c++/4.8/backward/hashtable.h:64,
from /usr/include/c++/4.8/ext/hash_map:64,
from /home/hadoop/wrp/TES_test/tb-common-utils/include/tbsys/config.h:20,
from /home/hadoop/wrp/TES_test/tb-common-utils/include/tbsys/tbsys.h:110,
from client_request_server.cpp:18:
/usr/include/stdlib.h:775:12: note: int abs(int)
extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
^
In file included from /usr/include/c++/4.8/bits/stl_algo.h:59:0,
from /usr/include/c++/4.8/algorithm:62,
from /usr/include/c++/4.8/backward/hashtable.h:64,
from /usr/include/c++/4.8/ext/hash_map:64,
from /home/hadoop/wrp/TES_test/tb-common-utils/include/tbsys/config.h:20,
from /home/hadoop/wrp/TES_test/tb-common-utils/include/tbsys/tbsys.h:110,
from client_request_server.cpp:18:
/usr/include/c++/4.8/cstdlib:166:3: note: long int std::abs(long int)
abs(long __i) { return __builtin_labs(__i); }
^
/usr/include/c++/4.8/cstdlib:174:3: note: long long int std::abs(long long int)
abs(long long __x) { return __builtin_llabs (__x); }
^
/usr/include/c++/4.8/cstdlib:179:3: note: __int128 std::abs(__int128)
abs(__int128 __x) { return __x >= 0 ? __x : -__x; }