> lex/regression_wide.cpp:93:11: warning: field 'constant' will be
> initialized after field 'operation' [-Wreorder]
> , constant (L"[0-9]+(\\.[0-9]+)?", ID_CONSTANT)
> ^
Fixes the following warning message from the Intel compiler:
> boost/spirit/home/qi/numeric/detail/real_impl.hpp(34): warning #780:
> using-declaration ignored -- it refers to the current namespace
Logic of the test is to prevent direct left recursion, but
currently because of it `b2` fails to compile `alternative.cpp`.
I have wrapped the case with `SPIRIT_NO_COMPILE_CHECK` like it
has been done in `char1.cpp` and `sequence.cpp` tests.
Actually the test fails at compilation only with std >= c++11,
but passes with std <= c++03.
Error message:
> qi/reference.cpp:1047:31: error: ‘expect’ was not declared in this scope
> test_parser("xi", expect[char_('o')]); // should throw an exception
Introduced with PR #196 (commit d494fe189b)
Lex is using `unique_ptr` from `movelib` and relying on a bug in it,
described in a ticket https://svn.boost.org/trac/boost/ticket/11758
Since that bug fixed in `movelib`, Lex is uncompilable.
I have simplified unique_ptr usage by the following rules:
- `delete ptr.release()` is equal to `ptr.reset()`
- `delete a.release(); a = b;` is equal to `b.swap(a); b.reset();`
Now Lex test suite compiles and runs succesfully. VC++ 6 should be
happy too despite the fact that Boost no longer supports it.
This PR contains fixes for both issues reported by Lastique and
MarcelRaad. It makes PR #197 obsolete.
Removed obsolete dependency of test/qi/expectd.cpp on
mxc/qitoo/qitoo.hpp. Was reintroduced by mistake.
Created qi/detail/expectation_failure.hpp. It defines the
expectation_failure template as a common dependency of expect directive
and expect operator. Removed expectation_failure from
operator/expect.hpp.
Changed version.hpp to 2.54. I did not notice that addl file in the
first place.
The qi_expectd.hpp was removed. qi_expect.hpp now forwards to both
directive and operator. Directive doc adjusted to reflect that change.
Lexer.qbk restored to qi develop because change is not part of expect
directive.
As discussed with Joel de Guzman this PR introduces the expect directive
expect[] to spirit qi 2. PR includes code, test, example, and
documentation.
See
https://sourceforge.net/p/spirit/mailman/spirit-general/thread/nln5d3%24klg%241%40ger.gmane.org/#msg35208052
Here is what I did:
1. Added expect.hpp to home/qi/directives.
1a. Added forwarding header qi_expectd.hpp to include dir.
2. Renamed expectation parser (a > b) struct from expect to
expect_operator
to prevent name conflicts (expect directive uses struct
expect_directive).
3. Added expect directive to the common terminals
(common_terminals.hpp).
4. Added expectd.cpp to the test suite.
5. Added expectd.cpp to the examples.
6. Added expect directive documentation to directive.qbk. Crosslinked
expectation operator and expect directive docs.
7. Added expect directive to the index.idx file for index-generation.
8. Added expect directive to the qi quick_reference.qbk.
9. Added expect directive to the spirit reference card (tex, pdf)
10. Created a new section in the whats_new.hpp.
11. Changed spirit version to 2.5.4. Spirit index.html showed 2.5.2
allthough an 2.5.3 What's New section already existed. Fixed.
This change is necessary only to to maintain the independence of order
of header inclusion in qi.hpp.
Without that change, directive.hpp must be included before operator.hpp,
because the expect operator implementation was in a struct named expect
(before this change). This caused a naming conflict with the new expect
directive.