[Boost-bugs] [Boost C++ Libraries] #3519: It should be possible to use consts as external placeholder variables.

Subject: [Boost-bugs] [Boost C++ Libraries] #3519: It should be possible to use consts as external placeholder variables.
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-10-12 15:26:05


#3519: It should be possible to use consts as external placeholder variables.
-----------------------------------+----------------------------------------
 Reporter: ami.ganguli@… | Owner: eric_niebler
     Type: Feature Requests | Status: new
Milestone: To Be Determined | Component: xpressive
  Version: Boost 1.40.0 | Severity: Problem
 Keywords: |
-----------------------------------+----------------------------------------
 The right-and-side of placeholder let-expressions are not declared as
 const, so common use-cases like:


 {{{
 placeholder<int> _i;
 smatch what;
 what.let(_i = 1);
 }}}


 or:


 {{{
 placeholder<MyClass *> _p;
 smatch what;
 what.let(_p = this);
 }}}


 fail to compile. It would be nice to have some way to specify a
 placeholder for non-mutable data. Perhaps:


 {{{
 placeholder<int const> _i;
 }}}

 (suggested by Eric Niebler)

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3519>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:01 UTC