Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre Boost 1.70 merge #471

merged 76 commits into from Feb 25, 2019


None yet
5 participants
Copy link

commented Feb 24, 2019

No description provided.

Romain-Geissler-1A and others added some commits Nov 11, 2018

Merge pull request #417 from Romain-Geissler-1A/noexcept
Replace `throw()` with `BOOST_NOEXCEPT_OR_NOTHROW`
Lex: Avoid casting `min_token_id` to `id_type` in lexer ctor
When `min_token_id` is not a valid value for `id_type` and `first_id` is not
provided lexer constructor is triggering UB. To fix this problem, constructor
with ommited `first_id` initializes `next_token_id` directly, so if unique ids
feature is not used there is no UB.
Merge pull request #420 from Kojoley/fix-lexer-constructor-ub
Lex: Avoid casting `min_token_id` to `id_type` in lexer ctor
Classic: Fixed position_iterator forming reference to local
When underlying iterator returns by value the corresponding position_iterator
was providing iterator_adaptor with a reference type what lead to returning
a reference to a local variable in dereference operator.

Made a custom trait because it is a way more elegant than:
    typedef typename boost::mpl::if_c<
        typename boost::add_reference<
            typename boost::add_const<
                typename boost::remove_reference<reference>::type
        typename boost::add_const<reference>::type
    >::type const_reference_type;

Merge pull request #422 from Kojoley/classic-fix-position_iterator-re…

Classic: Fixed position_iterator forming reference to local
utree: Fixed negative value shift
Result of shifting a negative value is an implementation defined behavior.

The temporaries and memcpy calls will be completely optimized out.
X3: Use constexpr in numeric utils instead of static storage
It is a symmetrical change to Qi one that landed a while ago d863782 (#146).
There should not be race condition on C++11+, but MSVC still does not do
compile-time initialization of static variables when constructor is constexpr
Merge pull request #424 from Kojoley/x3-numeric_utils-use-constexpr
X3: Use constexpr in numeric utils instead of static storage
Merge pull request #423 from Kojoley/fix-utree-negative-shift-ub
utree: Fixed negative value shift
X3.Tests: Added variable templates requirement
Also updated the readme, as Clang 3.5 does not support variable templates
(it also has some bogus warnings and broken Fusion map support).
Qi: rule: Added asserts for mismatching skipper types
It looks like mismatching skipper types and `parse`/`phrase_parse` calls are
quite popular mistakes, and the actual problem is not clear for users despite
that there is a comment near the call that will fail and the hint should be
found by following to the file and line that compiler reports the error on.
Merge pull request #427 from Kojoley/qi-rule-skipper-asserts
Qi: rule: Added asserts for mismatching skipper types
Doc: Fixed unescaped semicolon warning
Jamfile:53: Unescaped special character in argument <format>pdf:<xsl:param>boost.url.prefix=
The `boost/detail/iterator.hpp` header is obsolete
Both `iterator_traits` and `distance` in `boost::detail` namespace are just
aliases from `std` namespace.
Merge pull request #432 from Kojoley/remove-obsolete-detail-iterator
The `boost/detail/iterator.hpp` header is obsolete
Removed unused private header. Closes #433
The `boost/spirit/home/support/detail/lexer/serialise.hpp` header is a private header
and is not used anywhere in Spirit or Boost. No one should be affected by the change.

Kojoley and others added some commits Jan 27, 2019

Revert to use <dependency> feature
This was my fault when I did not mark subfeature `propogated` and after fixing
it I did not retest this thing.
simplify value_initialize trait
removed use of boost::value_initialized which is obsolete post C++11
X3: rule: Skip attribute synthesization on unused actual attribute
There is a mistake in `make_attribute` trait that leads to synthesization and
immediately throwing out an attribue, so rule context always was unused_type
when actual attribute is unused_type (added test for this case). Instead of
fixing `make_attribute` trait I just completely removed synthesization in
rule by removing `make_attribute` trait usage (the traits could be removed
after a simple change in 'action' parser). I think the change is better
than fixing the trait because it removes excessive attribute default
construction in every rule and makes rule almost free to use.
X3: Ensure symmetric transforms
Use transform pre/post directly. Cannot do the same for V2 right now because of
make_attribute, it needs asymmetric transformations.
X3: Fixed static assert on parse_rule instantiation
During overload resolution disallowed signature can be instantiated leading
to firing the static assertation and overload resolution failure. I could
just remove it, but do not want to leave unbounded by value overloads;
replacing to not deducing Attribute with specifying a default parameter will
not work because we want to allow `BOOST_SPIRIT_DECLARE` without prior
`BOOST_SPIRIT_DEFINE` - this requires having default parameters in both
declaration and definition and the standard seems to forbid it (GCC - fine,
MSVC - warning, Clang - error).

Reverts #437, fixes #453.
X3: Perform attribute transformation before calling parse_rule
This will deal with linking problems when rule attribute type is not the same
as the actual attribute type. It will not harm anyone as the transformation
after parse_rule will just pass-through the attribute because it will be the
same there. It will also do not alter rule_definition parsing so other usages
are still valid.
X3: parse_rule attribute must always be of rule::attribute_type&
After #456 `parse_rule` is always called with value of `rule::attribute_type&`
type. By removing attribute type deduction we also will turn any possible bug
in `transform_attribute` from a linkage to compile error.

Fixes #454
Remove broken 1.0#INF parser
It was poorly documented and never worked correctly. None of atof, strtof, and
input streams are accepting such values. Fixing it would be a bigger breaking
change than removing it.

Fixes #415, addresses #163 and
utree: Fixed double conversion
The double conversion `spirit::string -> std::string -> spirit::string` was
happening silently in rules because of `transform_attribute` was returning
`std::string` and implicit constructor in `spirit::string`.

The mistake could be prevented if `spirit::basic_string` constructor from
derived class was explicit, but `utree_cast` uses `is_convertible` while
`is_constructible` is not implemented for C++03 (it is possible, but requires
expression SFINAE support from compiler - N2634).
V2: Merge make_attribute into transform_attribute
This will allow to simplify transform_attribute (e.g. no need to handle
references anymore) and to ensure the pre/post/fail calls are made to the
same transformation.
X3: Replaced make_attribute with direct attribute construction
If the attribute has a general way to be constructed it should already have a
default constructor.
V2: Use pre/post/fail functions directly from the transform
This will ensure that the same transformation is used for all operations.
extract_uint: Fixed IgnoreOverflowDigits=true problem at overflow
The IgnoreOverflowDigits=true parser always succeeds and because of that it
expects from the digits parser that a number passed as inout argument will be
changed only on success.

Changed negative_accumulator and X3 for consistency.

@Kojoley Kojoley merged commit 3cafb2b into master Feb 25, 2019

4 checks passed

continuous-integration/appveyor/branch AppVeyor build succeeded
continuous-integration/appveyor/pr AppVeyor build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed
continuous-integration/travis-ci/push The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.