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
merged 76 commits into from
Feb 25, 2019
Merged

Pre Boost 1.70 merge #471

merged 76 commits into from
Feb 25, 2019

Conversation

Kojoley
Copy link
Collaborator

@Kojoley Kojoley commented Feb 24, 2019

No description provided.

Romain-Geissler-1A and others added 30 commits November 11, 2018 23:14
Replace `throw()` with `BOOST_NOEXCEPT_OR_NOTHROW`
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.
Lex: Avoid casting `min_token_id` to `id_type` in lexer ctor
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:
```cpp
    typedef typename boost::mpl::if_c<
        boost::is_reference<reference>::value,
        typename boost::add_reference<
            typename boost::add_const<
                typename boost::remove_reference<reference>::type
            >::type
        >::type,
        typename boost::add_const<reference>::type
    >::type const_reference_type;
```

Fixes https://svn.boost.org/trac10/ticket/9737.
…turns-reference-to-local

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

The temporaries and memcpy calls will be completely optimized out.
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
https://developercommunity.visualstudio.com/content/problem/336946/class-with-constexpr-constructor-not-using-static.html
X3: Use constexpr in numeric utils instead of static storage
Also updated the readme, as Clang 3.5 does not support variable templates
(it also has some bogus warnings and broken Fusion map support).
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.
Qi: rule: Added asserts for mismatching skipper types
Jamfile:53: Unescaped special character in argument <format>pdf:<xsl:param>boost.url.prefix=http://www.boost.org/doc/libs/release/libs/spirit/doc/html
Both `iterator_traits` and `distance` in `boost::detail` namespace are just
aliases from `std` namespace.
The `boost/detail/iterator.hpp` header is obsolete
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 29 commits January 26, 2019 17:32
This was my fault when I did not mark subfeature `propogated` and after fixing
it I did not retest this thing.
removed use of boost::value_initialized which is obsolete post C++11
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.
Use transform pre/post directly. Cannot do the same for V2 right now because of
make_attribute, it needs asymmetric transformations.
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.
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.
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
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 https://svn.boost.org/trac10/ticket/8699
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).
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.
If the attribute has a general way to be constructed it should already have a
default constructor.
This will ensure that the same transformation is used for all operations.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants