In version 2.1.2 when trying to include "spatial/idle_point_multiset.hpp" library produces error:
"Error 1 error C2143: syntax error : missing ';' before '<' \spatial\bits\spatial_kdtree.hpp line:58"
Error arises in VisualStudio 2013 and in gcc 4.6.3 (Ubuntu 12.04). In both cases problem is solved by including "spatial/point_multiset.hpp" before. To be perfectly clear this works:
#include "stdafx.h"
#include \<vector>
#include "spatial/point_multiset.hpp"
#include "spatial/idle_point_multiset.hpp"
int _tmain(int argc, _TCHAR* argv[])
{
typedef spatial::point_multiset<0, std::vector<double> >
runtime_container;
runtime_container tmp(5);
return 0;}
and this doesn't compile:
#include "stdafx.h"
#include \<vector>
//#include "spatial/point_multiset.hpp"
#include "spatial/idle_point_multiset.hpp"
int _tmain(int argc, _TCHAR* argv[])
{
typedef spatial::point_multiset<0, std::vector<double> >
runtime_container;
runtime_container tmp(5);
return 0;}
P.S: Sorry for extra \ in includes, but despite 15 minutes googling I still dont know how to produce braces in markdown :/
Anonymous
Thanks for the report. I will look into it.
Hi Feldmarshal,
I misread maybe, but it seems that you are trying to create a "point_multiset" and not an "idle_point_multiset" object. Therefore it is normal that the "point_multiset.hpp" is required.
They are 2 different types of containers, hence they are located in 2 different include.
Maybe due to the naming you though that idle_point_multiset.hpp would also provide point_multiset, but that is not the case. (Similarly, including multimap does not provide map).
Please clarify if I misunderstood your report.
If not, I will close it, I believe it's not an error.
Regards,
Sylvain
Sorry, must have pasted wrong code. The code did not compile event
when no container (of any type) was created - just including the
header idle_point_multiset.hpp was enough to stop code from compiling.
Including point_multiset.hpp before seemed to fix this.
Tomorrow I will retest it once more, just to be sure. Today I don't
have access to machine with either g++ or VisualStudio 2013.
mp
On Tue, Mar 4, 2014 at 4:51 PM, Sylvain Bougerel bouhdevel@users.sf.net wrote:
Related
Bug Report:
#1<html>
<head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
This code does not compile:
The problem is, that spatial::details::Kdtree.valuecomapre is of
unnknown type.
This code compiles:
Propably there is missing include of
spatial\spatial_value_compare.hpp, where this struct is defined.
Is everything clear now?
mp
W dniu 2014-03-05 00:39, Sylvain Bougerel pisze:
</body>
</html>
Related
Bug Report:
#1Hi Feldmarshall,
Sorry, I was very busy at work last week.
Okay, I clearly understand now. I will re-open the issue and try to reproduce it.
It shouldn't take long.
Thanks again for persisting :)
Sylvain
Following your empty main() example, I can perfectly reproduce the error on the latest from the master branch.
The issue has been fixed in release 2.1.3, that is being uploaded now.
Thanks again.