id summary reporter owner description type status milestone component version severity resolution keywords cc 11188 can not use repeat(int)[] with std::ref and phoenix::ref vveesskkoo@… Joel de Guzman "Debian libboost-dev 1.55[[BR]] When trying to compile a rule containing: {{{ qi::repeat(std::ref(_n))[some_action] }}} the compiler complains: /usr/include/boost/spirit/home/qi/directive/repeat.hpp:88:40: error: use of deleted function ‘std::reference_wrapper<_Tp>::reference_wrapper(_Tp&&) [with _Tp = int]’[[BR]] T start() const { return '''type(0);''' } In this situation qi:repeat (repeat.hpp:88:40) tries to create an iterator from[[BR]] std::reference_wrapper<>(rhs_value) which is not possible as a reference is needed! As a temporary workaround I used the following help type: {{{ template class ref_rhs: public std::reference_wrapper { private: T _rhval; public: using std::reference_wrapper::reference_wrapper; // inherit constructors ref_rhs(T&& rhs): std::reference_wrapper(_rhval), _rhval(rhs) {} }; }}} and the call: qi::repeat(ref_rhs(_n))[] works as expected. May be qi:repeat should iterate internally with integers rather than with iterators as the documentation says that in the call qi::repeat(_n) _n must be convertible to int anyway. " Bugs new To Be Determined spirit Boost 1.58.0 Problem repeat