OBJ Parser with Boost Spirit - Ignoring comments
I'm trying to write a basic OBJ file loader using the Boost Spirit library. Although I got it working using the standard std::ifstreams, I'm wondering if it's possible to do a phrase_parse on the entire file using a memory mapped file, since it seems to provide the best performance as posted here . I have the following code, which seems to work well, but it breaks when there is a comment in the file. So, my question is how do you ignore a comment that starts with a '#' in the OBJ file using Spririt? struct vertex { double x, y, z; }; BOOST_FUSION_ADAPT_STRUCT( vertex, (double, x) (double, y)