On Tue, Mar 8, 2016 at 10:50 PM, Thiago Macieira <thiago.macieira at intel.com> wrote:
> On ter?a-feira, 8 de mar?o de 2016 22:30:37 PST Philippe Coval wrote: > > On Tue, Mar 8, 2016 at 10:03 PM, Otavio Pontes <otavio.pontes at intel.com> > > wrote: > > > I am seeing the following error when building iotivity using 1.1-rel > > > branch: > > > > > > service/scene-manager/src/Scene.cpp: In member function > > > 'std::vector<std::shared_ptr<OIC::Service::SceneAction> > > > > OIC::Service::Scene::getSceneActions() const': > > > service/scene-manager/src/Scene.cpp:122:29: error: capture of > non-variable > > > 'OIC::Service::Scene::m_name' > > > [&actions, &m_name](const SceneMemberResource::Ptr& > > > member) > > > ^ > > > Yes I observed this too and pushed fixes but they're not yet merged : > > > > https://gerrit.iotivity.org/gerrit/#/c/5497/ > > The commit should explain why this solves and why the current code is bad. > > Looking up the C++ standard, it says that "An entity that is designated by > a > simple-capture [...] shall be this or a variable with automatic storage > duration". That means you cannot capture non-static members by name and you > have to capture the whole object. Using [&] like you did in your code > accomplishes capturing of "this". > > If you could update the commit message to explain that fact, it would help. > > Yea thanks for clarification, I am not a C++11 warlord It does not tell which compiler is supporting previous code ? MSVC ? and why didnt CI raise an alert ? So, I just rebased my patch serie on master branch (1.0.0+RC1+736+g37a2b4a) before the bots rebuild it all, you can start reviews by starting with this one : https://gerrit.iotivity.org/gerrit/#/c/5497/2 Thanks for all -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20160308/7dceec9d/attachment.html>
