Larry Evans

Results 53 comments of Larry Evans

> @intractabilis, I've now uploaded: https://github.com/cppljevans/boost.exploratory/tree/main/boost.replacements/ which shows how, using a no-collapsing attribute_of function, the attributes can exactly mirror the parsers; hence, will always succeed compilation without some incomprehensible compiler...

The boost::is_same use here: [is_substitute is_same use](https://github.com/boostorg/spirit/blob/develop/include/boost/spirit/home/x3/support/traits/is_substitute.hpp#L85) maybe the problem because it returns false when comparing: attribute_of::type with LogData. Note that the attribute_of is: ````c++ fusion::deque < int16_t , boost::variant...

The problem is caused by lack of: ```c++ template struct is_substitute_impl < T , Attribute , typename enable_if < mpl::and_ < is_variant , is_variant , component_types_substitutable > >::type > :...

I should have mentioned here: https://github.com/boostorg/spirit/issues/707#issuecomment-1269591499 that the unspecialized component_types_substitutable was: ```c++ template < typename Aof , typename Ast > struct component_types_substitutable { static std::size_t constexpr size_Aof= fusion::result_of::size::value ; static...

The "partial" solution is here: https://github.com/cppljevans/spirit-experiments/blob/develop/include/boost/spirit/home/x3/support/traits/is_substitute.hpp The test case is here: https://github.com/cppljevans/spirit-experiments/blob/develop/test/x3/issue707.cpp I use "partial" because it uses fold expression here: https://github.com/cppljevans/spirit-experiments/blob/develop/include/boost/spirit/home/x3/support/traits/is_substitute.hpp#L156 and the boost test runners, by default, don't...

@djowel, I had a hard time understanding your point until I changed the value declaration to: ```c++ #define ATTR_TYPE 2 #if ATTR_TYPE==0 std::string value="dummy init string."; #elif ATTR_TYPE==1 std::vector value;...

[djowel says](https://github.com/boostorg/spirit/issues/618#issuecomment-662809671): > IMO, we trust the programmer that he knows what he is doing and not act like the coding police. At least, perhaps we can invent a static_warning...

Mistakenly closed it :(

[@sehe said:](https://github.com/boostorg/spirit/issues/618#issuecomment-662791927) > > I can see myself parsing input where fractions are admissable, but I'm not interested in them. Not quite astonishing to want to allow people to enter...

[@cppljevans said](https://github.com/boostorg/spirit/issues/618#issuecomment-663777003): > But you could fairly easy do that without the implicit conversions: > > ```c++ > bool result= > x3::phrase_parse( > begin, > end, > double_to_int_parser, x3::blank, >...