id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 11522,Boost.Geometry - not enough namespace prefixing in boost/geometry/detail/buffer/buffered_ring.hpp,steve.hickman@…,Barend Gehrels,"Compiling v 1.58 with Visual Studio 2012, I get the following errors: 1>d:\boost\boost_1_58_0\boost\geometry\algorithms\detail\buffer\buffered_ring.hpp(98): error C3083: 'buffer': the symbol to the left of a '::' must be a type 1>d:\boost\boost_1_58_0\boost\geometry\algorithms\detail\buffer\buffered_ring.hpp(98): error C2039: 'buffered_ring' : is not a member of 'boost::geometry::traits::detail' 1>d:\boost\boost_1_58_0\boost\geometry\algorithms\detail\buffer\buffered_ring.hpp(98): error C2065: 'buffered_ring' : undeclared identifier 1>d:\boost\boost_1_58_0\boost\geometry\algorithms\detail\buffer\buffered_ring.hpp(98): error C2974: 'boost::geometry::traits::tag' : invalid template argument for 'Geometry', type expected 1> d:\boost\boost_1_58_0\boost\geometry\core\tag.hpp(42) : see declaration of 'boost::geometry::traits::tag' 1>d:\boost\boost_1_58_0\boost\geometry\algorithms\detail\buffer\buffered_ring.hpp(98): error C2143: syntax error : missing ';' before '>' 1>d:\boost\boost_1_58_0\boost\geometry\algorithms\detail\buffer\buffered_ring.hpp(98): error C2976: 'boost::geometry::traits::tag' : too few template arguments 1> d:\boost\boost_1_58_0\boost\geometry\core\tag.hpp(42) : see declaration of 'boost::geometry::traits::tag' 1>d:\boost\boost_1_58_0\boost\geometry\algorithms\detail\buffer\buffered_ring.hpp(98): error C2059: syntax error : '>' 1>d:\boost\boost_1_58_0\boost\geometry\algorithms\detail\buffer\buffered_ring.hpp(99): error C2143: syntax error : missing ';' before '{' 1>d:\boost\boost_1_58_0\boost\geometry\algorithms\detail\buffer\buffered_ring.hpp(99): error C2447: '{' : missing function header (old-style formal list?) 1>d:\boost\boost_1_58_0\boost\geometry\algorithms\detail\buffer\buffered_ring.hpp(105): error C3083: 'buffer': the symbol to the left of a '::' must be a type 1>d:\boost\boost_1_58_0\boost\geometry\algorithms\detail\buffer\buffered_ring.hpp(105): error C2039: 'buffered_ring' : is not a member of 'boost::geometry::traits::detail' 1>d:\boost\boost_1_58_0\boost\geometry\algorithms\detail\buffer\buffered_ring.hpp(105): error C2065: 'buffered_ring' : undeclared identifier 1>d:\boost\boost_1_58_0\boost\geometry\algorithms\detail\buffer\buffered_ring.hpp(105): error C2974: 'boost::geometry::traits::point_order' : invalid template argument for 'Ring', type expected 1> d:\boost\boost_1_58_0\boost\geometry\core\point_order.hpp(70) : see declaration of 'boost::geometry::traits::point_order' 1>d:\boost\boost_1_58_0\boost\geometry\algorithms\detail\buffer\buffered_ring.hpp(105): error C2143: syntax error : missing ';' before '>' 1>d:\boost\boost_1_58_0\boost\geometry\algorithms\detail\buffer\buffered_ring.hpp(105): error C2059: syntax error : '>' 1>d:\boost\boost_1_58_0\boost\geometry\algorithms\detail\buffer\buffered_ring.hpp(106): error C2143: syntax error : missing ';' before '{' 1>d:\boost\boost_1_58_0\boost\geometry\algorithms\detail\buffer\buffered_ring.hpp(106): error C2447: '{' : missing function header (old-style formal list?) 1>d:\boost\boost_1_58_0\boost\geometry\algorithms\detail\buffer\buffered_ring.hpp(112): error C3083: 'buffer': the symbol to the left of a '::' must be a type 1>d:\boost\boost_1_58_0\boost\geometry\algorithms\detail\buffer\buffered_ring.hpp(112): error C2039: 'buffered_ring' : is not a member of 'boost::geometry::traits::detail' 1>d:\boost\boost_1_58_0\boost\geometry\algorithms\detail\buffer\buffered_ring.hpp(112): error C2065: 'buffered_ring' : undeclared identifier 1>d:\boost\boost_1_58_0\boost\geometry\algorithms\detail\buffer\buffered_ring.hpp(112): error C2974: 'boost::geometry::traits::closure' : invalid template argument for 'G', type expected 1> d:\boost\boost_1_58_0\boost\geometry\core\closure.hpp(76) : see declaration of 'boost::geometry::traits::closure' 1>d:\boost\boost_1_58_0\boost\geometry\algorithms\detail\buffer\buffered_ring.hpp(112): error C2143: syntax error : missing ';' before '>' 1>d:\boost\boost_1_58_0\boost\geometry\algorithms\detail\buffer\buffered_ring.hpp(112): error C2059: syntax error : '>' 1>d:\boost\boost_1_58_0\boost\geometry\algorithms\detail\buffer\buffered_ring.hpp(113): error C2143: syntax error : missing ';' before '{' 1>d:\boost\boost_1_58_0\boost\geometry\algorithms\detail\buffer\buffered_ring.hpp(113): error C2447: '{' : missing function header (old-style formal list?) 1>d:\boost\boost_1_58_0\boost\geometry\algorithms\detail\buffer\buffered_ring.hpp(119): error C3083: 'buffer': the symbol to the left of a '::' must be a type 1>d:\boost\boost_1_58_0\boost\geometry\algorithms\detail\buffer\buffered_ring.hpp(119): error C2039: 'buffered_ring_collection' : is not a member of 'boost::geometry::traits::detail' 1>d:\boost\boost_1_58_0\boost\geometry\algorithms\detail\buffer\buffered_ring.hpp(119): error C2065: 'buffered_ring_collection' : undeclared identifier 1>d:\boost\boost_1_58_0\boost\geometry\algorithms\detail\buffer\buffered_ring.hpp(119): error C2974: 'boost::geometry::traits::point_type' : invalid template argument for 'Geometry', type expected 1> d:\boost\boost_1_58_0\boost\geometry\core\point_type.hpp(44) : see declaration of 'boost::geometry::traits::point_type' 1>d:\boost\boost_1_58_0\boost\geometry\algorithms\detail\buffer\buffered_ring.hpp(119): error C2143: syntax error : missing ';' before '>' 1>d:\boost\boost_1_58_0\boost\geometry\algorithms\detail\buffer\buffered_ring.hpp(119): error C2059: syntax error : '>' 1>d:\boost\boost_1_58_0\boost\geometry\algorithms\detail\buffer\buffered_ring.hpp(120): error C2143: syntax error : missing ';' before '{' 1>d:\boost\boost_1_58_0\boost\geometry\algorithms\detail\buffer\buffered_ring.hpp(120): error C2447: '{' : missing function header (old-style formal list?) 1>d:\boost\boost_1_58_0\boost\geometry\algorithms\detail\buffer\buffered_ring.hpp(128): error C2976: 'boost::geometry::traits::tag' : too few template arguments 1> d:\boost\boost_1_58_0\boost\geometry\core\tag.hpp(42) : see declaration of 'boost::geometry::traits::tag' 1>d:\boost\boost_1_58_0\boost\geometry\geometries\linestring.hpp(119): error C3855: 'boost::geometry::traits::tag': template parameter 'Enable' is incompatible with the declaration 1>d:\boost\boost_1_58_0\boost\geometry\geometries\linestring.hpp(119): error C2977: 'boost::geometry::traits::tag' : too many template arguments 1> d:\boost\boost_1_58_0\boost\geometry\core\tag.hpp(42) : see declaration of 'boost::geometry::traits::tag' 1>d:\boost\boost_1_58_0\boost\geometry\geometries\polygon.hpp(174): error C3855: 'boost::geometry::traits::tag': template parameter 'Enable' is incompatible with the declaration 1>d:\boost\boost_1_58_0\boost\geometry\geometries\polygon.hpp(174): error C2977: 'boost::geometry::traits::tag' : too many template arguments 1> d:\boost\boost_1_58_0\boost\geometry\core\tag.hpp(42) : see declaration of 'boost::geometry::traits::tag' 1>d:\boost\boost_1_58_0\boost\geometry\geometries\multi_point.hpp(118): error C3855: 'boost::geometry::traits::tag': template parameter 'Enable' is incompatible with the declaration 1>d:\boost\boost_1_58_0\boost\geometry\geometries\multi_point.hpp(118): error C2977: 'boost::geometry::traits::tag' : too many template arguments 1> d:\boost\boost_1_58_0\boost\geometry\core\tag.hpp(42) : see declaration of 'boost::geometry::traits::tag' 1>d:\boost\boost_1_58_0\boost\geometry\geometries\multi_linestring.hpp(112): error C3855: 'boost::geometry::traits::tag': template parameter 'Enable' is incompatible with the declaration 1>d:\boost\boost_1_58_0\boost\geometry\geometries\multi_linestring.hpp(112): error C2977: 'boost::geometry::traits::tag' : too many template arguments 1> d:\boost\boost_1_58_0\boost\geometry\core\tag.hpp(42) : see declaration of 'boost::geometry::traits::tag' 1>d:\boost\boost_1_58_0\boost\geometry\geometries\point_xy.hpp(88): error C2953: 'boost::geometry::traits::tag' : class template has already been defined 1> d:\boost\boost_1_58_0\boost\geometry\core\tag.hpp(42) : see declaration of 'boost::geometry::traits::tag' ---------------------------------------------------- The problem is that the namespace hierarchy is such that lines with the errors are in a different namespace hierarchy (boost::geometry::detail) than the structs they are referring to (boost::geometry). Because these references aren't fully prefixed, the compiler can't find them (there is no ""using namespace boost::geometry"" preceding their inclusion. Libraries should not assume that users will specify such a thing.) This can be fixed by editing lines 97-128 to be the following: --------------------------------------------------- template struct tag > { typedef ring_tag type; }; template struct point_order > { static const order_selector value = geometry::point_order::value; }; template struct closure > { static const closure_selector value = geometry::closure::value; }; template struct point_type > { typedef typename geometry::point_type::type type; }; template struct tag > { typedef boost::geometry::detail::buffer::buffered_ring_collection_tag type; }; ",Bugs,closed,Boost 1.60.0,geometry,Boost 1.58.0,Showstopper,fixed,,