volca02 / openDarkEngine

Rewrite of the Dark Engine by Looking Glass
GNU General Public License v2.0
150 stars 18 forks source link

Compilation error: no matching function for call 'make_pair' #21

Closed jtecca closed 6 years ago

jtecca commented 7 years ago

Hi, I'm getting a compilation error after successfully running 'cmake' and then 'make'. I'm on Linux 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2 (2017-06-12) x86_64 GNU/Linux and I'm using the g++ from Debian stretch: g++ (Debian 6.3.0-18) 6.3.0 20170516

Here's the error:

✘-2 ~/source/openDarkEngine [master|…229] 
14:33 $ make
[  2%] Built target meshconvert
[  3%] Building CXX object src/main/CMakeFiles/OpenDark.dir/__/base/dyntype/DT
/home/jtecc/source/openDarkEngine/src/base/dyntype/DTypeDef.cpp: In member funring&, const Opde::DVariant&)’:
/home/jtecc/source/openDarkEngine/src/base/dyntype/DTypeDef.cpp:76:56: error: air(const string&, const Opde::DVariant&)’
   mValMap.insert(make_pair<string, DVariant>(key, value));
                                                        ^
In file included from /usr/include/c++/6/bits/stl_algobase.h:64:0,
                 from /usr/include/c++/6/bits/char_traits.h:39,
                 from /usr/include/c++/6/string:40,
                 from /usr/include/c++/6/stdexcept:39,
                 from /home/jtecc/source/openDarkEngine/src/base/dyntype/DType
                 from /home/jtecc/source/openDarkEngine/src/base/dyntype/DType
/usr/include/c++/6/bits/stl_pair.h:497:5: note: candidate: template<class _T1, std::__decay_and_strip<_Tp>::__type, typename std::__decay_and_strip<_T2>::__
     make_pair(_T1&& __x, _T2&& __y)
     ^~~~~~~~~
/usr/include/c++/6/bits/stl_pair.h:497:5: note:   template argument deduction/
/home/jtecc/source/openDarkEngine/src/base/dyntype/DTypeDef.cpp:76:46: note:  g {aka const std::__cxx11::basic_string<char>}’) to type ‘std::__cxx11::basic_
   mValMap.insert(make_pair<string, DVariant>(key, value));
                                              ^~~
src/main/CMakeFiles/OpenDark.dir/build.make:254: recipe for target 'src/main/CTypeDef.cpp.o' failed
make[2]: *** [src/main/CMakeFiles/OpenDark.dir/__/base/dyntype/DTypeDef.cpp.o]
CMakeFiles/Makefile2:694: recipe for target 'src/main/CMakeFiles/OpenDark.dir/
make[1]: *** [src/main/CMakeFiles/OpenDark.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
volca02 commented 6 years ago

Hey, I was pretty much gone from the project for several years. I'm starting to work on it again, the project needs a good amount of cleanup. I'll take this bug report into consideration but most of the code will probably need to be beaten up to shape anyway. Thanks for the report.