Problem (& Solution) compiling libkdtree++ using Intel Compiler
Ferdinand Mitterbauer
ferdinand.mitterbauer at gmx.at
Fri Oct 15 16:44:47 UTC 2010
Problem:
~~~~~~~~
Building a project using libkdtree++ using Intel C++ Compiler 11.1 (on
Windows 7, 64bit) results in the following error(s):
[...]\libkdtree++\kdtree++/kdtree.hpp(97): error: expected a declaration
typename _Cmp = std::less<typename _Acc::result_type>,
[...]\libkdtree++\kdtree++/kdtree.hpp(97): error: expected a ";"
typename _Cmp = std::less<typename _Acc::result_type>,
[... skipped bunch off error messages ... ]
The offending line(s) in kdtree.hpp:
93: template <size_t const __K, typename _Val,
94: typename _Acc = _Bracket_accessor<_Val>,
95: typename _Dist = squared_difference<typename _Acc::result_type,
96: typename _Acc::result_type>,
97: typename _Cmp = std::less<typename _Acc::result_type>,
98: typename _Alloc = std::allocator<_Node<_Val> > >
99: class KDTree : protected _Alloc_base<_Val, _Alloc>
Suggested solution:
~~~~~~~~~~~~~~~~~~~
Insert line "#include <functional>" in file kdtree.hpp
(Maybe Line 70 - right after the line "#include <algorithm>" - would be
a nice place).
greetings,
Ferdinand
More information about the libkdtree-devel
mailing list