Namespace issue in messages/image.hpp


We have found a intermittent namespace issue thats comes up when working with image protos. See error below:

./messages/image.hpp: In function ‘bool FromProto(ImageProto::Reader, const std::vectorisaac::SharedBuffer&, isaac::ImageBase<K, N, Container>&)’:
./messages/image.hpp:109:20: error: reference to ‘details’ is ambiguous
auto generator = details::generate_image_view<K, N, BufferType,
./messages/image.hpp:26:11: note: candidates are: namespace details { }
namespace details {
In file included from ./engine/core/math/so2.hpp:13:0,
from ./engine/core/math/pose2.hpp:12,
from ./engine/gems/serialization/json_formatter.hpp:19,
from ./engine/alice/hooks/config_hook.hpp:20,
from ./engine/alice/component.hpp:14,
from ./engine/alice/node.hpp:19,
from ./engine/alice/application.hpp:19,
from ./engine/alice/alice_codelet.hpp:12,

Essentially the error is coming from a duplicate namespace “details” containing another definition genterate_image_view. It is not a consistant error, it only happens when you also include certain other files, but becuse of many layers of inclusion we have not figured out exacly what files cause this.

Temporary solution: We have renamed the namespace “details” in messages/image.hpp from “details” to “imageDetails”

Thank you for letting us know. Will take a look at this.

And, thanks for the temp solution.

Hi, @FedoraLabs,
I am wondering how we could reproduce this issue.