boostorg / wave

Boost.org wave module
http://boost.org/libs/wave
21 stars 49 forks source link

Track the location tokens were expanded from, for __LINE__ and __FILE__ #106

Closed jefftrull closed 4 years ago

jefftrull commented 4 years ago

An (optional) extra position field is added to token_data and set for any identifier token created from a macro expansion. This information is used to correctly calculate the filename and line number.

If merged, this will resolve #94.

NOT intended for Boost 1.74.

jefftrull commented 4 years ago

With these changes we get the same answers as gcc - including on the difficult test case from the standard proposal (which I made into a unit test).