Re: X3 thread-safety
Igor R <[email protected]> Thu, 27 Dec 2018 00:33:48 +0200
| Newsgroups | gmane.comp.parsers.spirit.general |
|---|---|
| Message-ID | <CAPnv1PJS-biqP-LWMRcbck4AR9EkJj-xSuZ0hA7inbiBQXkrew@mail.gmail.com> |
> > But in the new version obj is taken by reference and forwarded to > > with_value_holder! > > Ooh that's subtle. And good to know. For me it's nice, because I usually > had to bother with `reference_wrapper` or similar kludges It's nice we can pass an object by reference. It's much less nice that one should now bend over backwards to employ value semantics (which seems to me rather common scenario). Maybe it's worth making separate with's for these two tasks, like "with" and "with_ref"?