Is it me or part of Boost Track SVN (Boost Geometr

2019-08-11 02:35发布

Boost geometry's dissolve described a bit here, is what I need right now, its SVN home is here but as soon as I include #include <boost/geometry/extensions/algorithms/dissolve.hpp> I get compile errors (error C4430, C2146 and C2061)=( Can any one provide a patch?

Sample code can be found for example here

Errors:

Error   2   error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\users\avesta\desktop\cf\trunk\cloudserver\3rdparty\header-only\boost\geometry\extensions\algorithms\dissolve.hpp 67  1   CloudServer

Error   3   error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\users\avesta\desktop\cf\trunk\cloudserver\3rdparty\header-only\boost\geometry\extensions\algorithms\dissolve.hpp 67  1   CloudServer

Error   1   error C2146: syntax error : missing ';' before identifier 'state_type'  c:\users\avesta\desktop\cf\trunk\cloudserver\3rdparty\header-only\boost\geometry\extensions\algorithms\dissolve.hpp 67  1   CloudServer

Error   4   error C2061: syntax error : identifier 'state_type' c:\users\avesta\desktop\cf\trunk\cloudserver\3rdparty\header-only\boost\geometry\extensions\algorithms\dissolve.hpp 76  1   CloudServer

minimal bit of code would look like (tested to fail with that wary errors on VS2010):

#include <boost/geometry/extensions/algorithms/dissolve.hpp>

int main()
{
    return 0;
}

2条回答
来,给爷笑一个
2楼-- · 2019-08-11 02:41

It compiles just fine for me here (with clang and gcc):

$ clang++ -I /Volumes/EyeFive/Marshall/Sources/boost/trunk junk.cpp
$ clang++ --version
Apple clang version 3.0 (tags/Apple/clang-211.10.1) (based on LLVM 3.0svn)
Target: x86_64-apple-darwin11.2.0
Thread model: posix
$ g++ -I /Volumes/EyeFive/Marshall/Sources/boost/trunk junk.cpp
$ g++ --version
i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Using the boost trunk. What compiler (and what version of that compiler) are you using?

So, I guess the answer is: It's you ;-)

查看更多
你好瞎i
3楼-- · 2019-08-11 02:42

The boost trunk branch is the development branch and doesn't always compile. In fact it's state changes every hour. If you want stable and compilable code, use one of the tag branches, for example: http://svn.boost.org/svn/boost/tags/release/Boost_1_47_0.

查看更多
登录 后发表回答