celix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pepijn Noltes <pepijnnol...@gmail.com>
Subject Re: Celix not building with g++ 7.1.1
Date Sun, 23 Jul 2017 19:18:11 GMT
Hi Erjan,

On Fri, Jul 21, 2017 at 7:39 PM erjan altena <erjanaltena@gmail.com> wrote:

> Hi,
> I have updated my system to Fedora 26 which comes with g++ 7.1.1 Now
> building Celix fails in the C++ DM.
> dependency_manager_cxx/include/celix/dm/Component_Impl.h: In member
> function ‘celix::dm::Component<T>&
> celix::dm::Component<T>::remove(celix::dm::CServiceDependency<T, I>&)’:
> /home/erjan/x/c/dependency_manager_cxx/include/celix/dm/Component_Impl.h:140:24:
> error: ‘class std::vector<std::shared_ptr<celix::dm::BaseServiceDependency>
> >’ has no member named ‘remove’; did you mean ‘resize’?
>      this->dependencies.remove(dep);
>                         ^~~~~~
>                         resize
> make[2]: ***
> [dependency_manager_cxx/CMakeFiles/dependency_manager_cxx_static.dir/build.make:159:
> dependency_manager_cxx/CMakeFiles/dependency_manager_cxx_static.dir/src/dm_activator.cc.o]
> Error 1
> The this->dependencies is a std::vector.
> Before I make changes to work around this problem, does anyone now if
> somehow the remove() member function of vector is removed ? which seems
> strange to me. (I have googled it but I did not find similar issues)
> Typical is that the remove function is not mentioned in references on the
> internet (i.e. cplusplus.com)
>  I also tried it in a separate test program. The remove member function is
> unknown.

I am aware of the issue and ran into it a few days ago. I think is due to
the ""stricter rules when using templates" for gcc 7.
Bit of background, original the dependencies where stored in a std::list
and this has changed in a std:vector. std::list has a remove function,
std::vector not.
This combined that the remove dependencies and remove dm components are not
yet tested/used in C++ dependency manager, these template code parts are

I was planning to fix this (and add some usage of the remove
dependency/component code), maybe with combining an update in the travis
config to add a gcc 7 as test target. But feel to pick it up .. ;)

> Regards,
> Erjan

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message