-
Notifications
You must be signed in to change notification settings - Fork 160
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
Pre Boost 1.70 merge #471
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Replace `throw()` with `BOOST_NOEXCEPT_OR_NOTHROW`
Simplify symbols
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
utree: Fixed negative value shift
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
Reduce lexical_cast includes
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.
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.
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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.