Menu

#1 including idle_point_multiset.hpp stops project from compiling

2.1.2
closed
None
2019-04-24
2014-02-26
No

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;}</double></vector>

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;}</double></vector>

P.S: Sorry for extra \ in includes, but despite 15 minutes googling I still dont know how to produce braces in markdown :/

Related

Bug Report: #1

Discussion

  • Sylvain Bougerel

    Thanks for the report. I will look into it.

     
  • Sylvain Bougerel

    • status: open --> accepted
     
  • Sylvain Bougerel

    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

     
    • Anonymous

      Anonymous - 2014-03-04

      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:

      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


      [tickets:#1] including idle_point_multiset.hpp stops project from compiling

      Status: accepted
      Milestone: 2.1.1

      Created: Wed Feb 26, 2014 04:20 PM UTC by Feldmarshall
      Last Updated: Sat Mar 01, 2014 04:49 AM UTC
      Owner: Sylvain Bougerel

      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></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 >
      runtime_container;
      runtime_container tmp(5);
      return 0;}

      and this doesn't compile:

      include "stdafx.h"

      include \<vector></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 >
      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 :/


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/spatial/tickets/1/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Bug Report: #1

  • Sylvain Bougerel

    • status: accepted --> wont-fix
     
    • Anonymous

      Anonymous - 2014-03-05
      <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
      OK, to finaly clarify.
      This code does not compile:

      #include "stdafx.h"
      #include "spatial\idle_point_multiset.hpp"


      int _tmain(int argc, _TCHAR* argv[])
      {
          return 0;
      }


      The problem is, that spatial::details::Kdtree.valuecomapre is of unnknown type.

      This code compiles:
      #include "stdafx.h"
      #include "spatial\point_multiset.hpp"
      #include "spatial\idle_point_multiset.hpp"


      int _tmain(int argc, _TCHAR* argv[])
      {
          return 0;
      }

      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:
      • status: accepted --> wont-fix

      [tickets:#1] including idle_point_multiset.hpp stops project from compiling

      Status: wont-fix
      Milestone: 2.1.1
      Created: Wed Feb 26, 2014 04:20 PM UTC by Feldmarshall
      Last Updated: Tue Mar 04, 2014 03:51 PM UTC
      Owner: Sylvain Bougerel

      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 >
      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 >
      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 :/


      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/spatial/tickets/1/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/


       

      Related

      Bug Report: #1

  • Sylvain Bougerel

    Hi 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

     
  • Sylvain Bougerel

    • status: wont-fix --> accepted
     
  • Sylvain Bougerel

    Following your empty main() example, I can perfectly reproduce the error on the latest from the master branch.

     
  • Sylvain Bougerel

    The issue has been fixed in release 2.1.3, that is being uploaded now.

    Thanks again.

     
  • Sylvain Bougerel

    • status: accepted --> closed
    • Milestone: 2.1.1 --> 2.1.2
     

Anonymous
Anonymous

Add attachments
Cancel