1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| g++ -o env Env.cpp -std=c++1y -Wall -I/usr/include/gdal -L/usr/lib/ -lgdal
Env.cpp: In function int main():
Env.cpp:203:88: error: no matching function for call to make_pair(int&, std::remove_reference<int&>::type)
std::cout << "value =" << environment(id, std::make_pair<int, int>(x, std::move(temp)), time) << std::endl;
^
Env.cpp:203:88: note: candidate is:
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:64:0,
from /usr/include/c++/4.8/bits/stl_tree.h:61,
from /usr/include/c++/4.8/map:60,
from Env.cpp:3:
/usr/include/c++/4.8/bits/stl_pair.h:276:5: note: template<class _T1, class _T2> constexpr std::pair<typename std::__decay_and_strip<_Tp>::__type, typename std::__decay_and_strip<_T2>::__type> std::make_pair(_T1&&, _T2&&)
make_pair(_T1&& __x, _T2&& __y)
^
/usr/include/c++/4.8/bits/stl_pair.h:276:5: note: template argument deduction/substitution failed:
Env.cpp:203:88: note: cannot convert x (type int) to type int&&
std::cout << "value =" << environment(id, std::make_pair<int, int>(x, std::move(temp)), time) << std::endl; |
Partager