Opened 21 years ago
Closed 21 years ago
#929 closed Bugs (Fixed)
BOOST_RE_USE_FACET macro def wrong
| Reported by: | chuckm | Owned by: | John Maddock |
|---|---|---|---|
| Milestone: | Component: | regex | |
| Version: | None | Severity: | |
| Keywords: | Cc: |
Description
When using STLPort (4.1 beta 6) with VC6, the
BOOST_RE_USE_FACET() macro definition is wrong. I've
been unable to trace how it gets to be this way, but
here's an example of the problem. In
cpp_regex_traits.cpp, we have:
const std::messages<char>* pm = &BOOST_RE_USE_FACET
(l, std::messages<char>);
This gets expanded by the preprocessor to:
const _STL::messages<char>* pm = &_STL::*_Use_facet
(l, (_STL::messages<char>*)0, true);
Note that STLPort defines std to _STL. That's nothing
to worry about. The problem is
that "_STL::*_Use_facet" is a syntax error.
I tried tracking this down in regex_config.hpp, but
got lost. Here are all the possible definitions for
BOOST_RE_USE_FACET:
#define BOOST_RE_USE_FACET(l, m)
(*std::_Use_facet<m >(l))
This can't be the one being used -- the * is in the
wrong place. I'd expect it to come just before the
_Use_facet.
#define BOOST_RE_USE_FACET(l, type) std::use_facet
(l, (type*)0, true)
This is obviously not it.
#define BOOST_RE_USE_FACET(l, type) std::use_facet
(l, (type*)0)
Neither is this.
#define BOOST_RE_USE_FACET(l, type)
std::use_facet< type >(l)
Niether is this.
#define BOOST_RE_USE_FACET(l, type) std::use_facet
(l, (type*)0)
Nor this.
So, I'm unable to figure out how the preprocessor is
ending up with a * just in front of _Use_facet. It's
pretty hard to debug the preprocessor!
So, as it stands, something is broken. Whether it's
VC6 or regex_config.hpp, I can't tell...
Note:
See TracTickets
for help on using tickets.
