const qi::rule<iterator_t> rule = value % +detail::character_encoding_namespace::space;
The compiler return the following errors:
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\parser\misc.hpp(290): error C3083: 'ascii': the symbol to the left of a '::' must be a type
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\parser\misc.hpp(290): error C2039: 'space': is not a member of 'svgpp::detail'
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\document_traversal.hpp(38): note: see declaration of 'svgpp::detail'
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\parser\misc.hpp(269): error C2065: 'space': undeclared identifier
They occur twice, so I'm assuming this is instantiated twice
Line 269 is the top of the structure
I believe these to all be related to the same thing, and therefore, constitute one error.
The crazy thing about this, and which leads me to believe this is a compiler bug is that within the editor, you can hover over the code in question and it knows the values and the correct memberships.
I've spent the last couple of days playing with different means of correcting this. Its as if the compiler doesn't understand that svgpp::detail has been initialized, in particular the character_encoding_namespace member of details.
for debugging purposes, I've created namespace variables and then tried to assign to them and use them:
The new line 290: (modified file)
290: namespace cem1 = boost;
291: namespace cem2 = boost::spirit;
292: namespace cem3 = boost::spirit::ascii;
293: namespace cem4 = detail;
294: namespace cem5 = detail::boost;
295: namespace cem6 = detail::boost::spirit;
296: namespace cem7 = detail::boost::spirit::ascii;
297: namespace cem8 = svgpp;
298: namespace cem9 = svgpp::detail;
299: namespace cem10 = svgpp::detail::boost;
300: namespace cem11 = svgpp::detail::boost::spirit;
301: namespace cem12 = svgpp::detail::boost::spirit::ascii;
303: const qi::rule<iterator_t> rule1 = value % +cem1::spirit::ascii::space;
304: const qi::rule<iterator_t> rule2 = value % +cem2::ascii::space;
305: const qi::rule<iterator_t> rule3 = value % +cem3::space;
306: const qi::rule<iterator_t> rule4 = value % +cem4::boost::spirit::ascii::space;
307: const qi::rule<iterator_t> rule5 = value % +cem5::spirit::ascii::space;
308: const qi::rule<iterator_t> rule6 = value % +cem6::ascii::space;
309: const qi::rule<iterator_t> rule7 = value % +cem7::space;
310: const qi::rule<iterator_t> rule8 = value % +cem8::detail::boost::spirit::ascii::space;
311: const qi::rule<iterator_t> rule9 = value % +cem9::boost::spirit::ascii::space;
312: const qi::rule<iterator_t> rule10 = value % +cem10::spirit::ascii::space;
313: const qi::rule<iterator_t> rule11 = value % +cem11::ascii::space;
314: const qi::rule<iterator_t> rule12 = value % +cem12::space;
The relevant errors extracted from the error log file are:
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\parser\misc.hpp(294): error C2039: 'boost': is not a member of 'svgpp::detail'
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\document_traversal.hpp(38): note: see declaration of 'svgpp::detail'
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\parser\misc.hpp(295): error C3083: 'boost': the symbol to the left of a '::' must be a type
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\parser\misc.hpp(295): error C2039: 'spirit': is not a member of 'svgpp::detail'
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\document_traversal.hpp(38): note: see declaration of 'svgpp::detail'
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\parser\misc.hpp(269): error C2878: 'spirit': a namespace or class of this name does not exist
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\parser\misc.hpp(296): error C3083: 'boost': the symbol to the left of a '::' must be a type
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\parser\misc.hpp(296): error C3083: 'spirit': the symbol to the left of a '::' must be a type
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\parser\misc.hpp(296): error C2039: 'ascii': is not a member of 'svgpp::detail'
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\document_traversal.hpp(38): note: see declaration of 'svgpp::detail'
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\parser\misc.hpp(269): error C2878: 'ascii': a namespace or class of this name does not exist
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\parser\misc.hpp(299): error C2039: 'boost': is not a member of 'svgpp::detail'
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\document_traversal.hpp(38): note: see declaration of 'svgpp::detail'
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\parser\misc.hpp(300): error C3083: 'boost': the symbol to the left of a '::' must be a type
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\parser\misc.hpp(300): error C2039: 'spirit': is not a member of 'svgpp::detail'
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\document_traversal.hpp(38): note: see declaration of 'svgpp::detail'
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\parser\misc.hpp(301): error C3083: 'boost': the symbol to the left of a '::' must be a type
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\parser\misc.hpp(301): error C3083: 'spirit': the symbol to the left of a '::' must be a type
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\parser\misc.hpp(301): error C2039: 'ascii': is not a member of 'svgpp::detail'
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\document_traversal.hpp(38): note: see declaration of 'svgpp::detail'
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\parser\misc.hpp(306): error C3083: 'boost': the symbol to the left of a '::' must be a type
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\parser\misc.hpp(306): error C3083: 'spirit': the symbol to the left of a '::' must be a type
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\parser\misc.hpp(306): error C3083: 'ascii': the symbol to the left of a '::' must be a type
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\parser\misc.hpp(306): error C2039: 'space': is not a member of 'svgpp::detail'
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\document_traversal.hpp(38): note: see declaration of 'svgpp::detail'
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\parser\misc.hpp(269): error C2065: 'space': undeclared identifier
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\parser\misc.hpp(269): error C2653: 'cem6': is not a class or namespace name
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\parser\misc.hpp(308): error C2065: 'space': undeclared identifier
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\parser\misc.hpp(269): error C2653: 'cem7': is not a class or namespace name
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\parser\misc.hpp(309): error C2065: 'space': undeclared identifier
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\parser\misc.hpp(310): error C3083: 'boost': the symbol to the left of a '::' must be a type
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\parser\misc.hpp(310): error C3083: 'spirit': the symbol to the left of a '::' must be a type
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\parser\misc.hpp(310): error C3083: 'ascii': the symbol to the left of a '::' must be a type
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\parser\misc.hpp(310): error C2039: 'space': is not a member of 'svgpp::detail'
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\document_traversal.hpp(38): note: see declaration of 'svgpp::detail'
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\parser\misc.hpp(311): error C3083: 'boost': the symbol to the left of a '::' must be a type
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\parser\misc.hpp(311): error C3083: 'spirit': the symbol to the left of a '::' must be a type
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\parser\misc.hpp(311): error C3083: 'ascii': the symbol to the left of a '::' must be a type
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\parser\misc.hpp(311): error C2039: 'space': is not a member of 'svgpp::detail'
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\document_traversal.hpp(38): note: see declaration of 'svgpp::detail'
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\parser\misc.hpp(269): error C2653: 'cem11': is not a class or namespace name
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\parser\misc.hpp(313): error C2065: 'space': undeclared identifier
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\parser\misc.hpp(269): error C2653: 'cem12': is not a class or namespace name
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\parser\misc.hpp(314): error C2065: 'space': undeclared identifier
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\parser\misc.hpp(316): error C3083: 'ascii': the symbol to the left of a '::' must be a type
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\parser\misc.hpp(316): error C2039: 'space': is not a member of 'svgpp::detail'
c:\users\johnsolo\source\svgpp_test\svgpp_test\svgpp\document_traversal.hpp(38): note: see declaration of 'svgpp::detail'
This list appears twice in the error log
Note that line 316 refers to the original attempt to establish the rule, or line 290 in the unmodified file
Given what worked and what didn't. it is obvious that, as expected, boost, spirit and ascii are not members of svgpp::detail or sgvpp
Other tests like this which I have performed indicate that character_encoding_namespace is not a member of detail or uninitialized at the time this code is compiled.
The compiler appears to be dropping anything character_encoding_namespace was referencing leaving the expanded variable to be accessed as detail::space.
space is obviously not a member of detail.
This then begs the question: Why isn't character_encoding_namespace a member of detail, or if it is, why isn't it initialized to boost::spirit::ascii ?
I don't really have the means or understanding to determine which of the two questions is relevant to the debug process.
Remember that tooltips gets it right, so the online parser understands the correct relationship. The regular compiler doesn't. I'm also keeping in mind that many others have successfully compiled this using other compilers and earlier versions of MSVC.
Given that I don't code often, I need help resolving this.
Regards,
Louis Johnson