mparry commented on code in PR #2270:
URL: https://github.com/apache/avro/pull/2270#discussion_r1219593498
##########
lang/c++/api/Node.hh:
##########
@@ -40,30 +40,38 @@ class GenericDatum;
using NodePtr = std::shared_ptr<Node>;
class AVRO_DECL Name {
+ struct Aliases;
+
std::string ns_;
std::string simpleName_;
+ std::unique_ptr<Aliases> aliases_;
Review Comment:
Originally, I simply had
```cpp
std::vector<std::string> aliases_;
std::set<std::string> fqAliases_;
```
here but there is something peculiar going on when built under GCC 11 (as
used in the GitHub action runner). Any addition of a container member here,
with no other code change, causes some lifetime issues with the `weak_ptr`
reference in `NodeSymbolic` that breaks certain `avrogencpp` tests. I have to
suspect some issue with `libstdc++` 11.x because it's fine when built with
Clang or if I take this new approach instead.
Arguably, this is nicer anyway since it minimises overhead for the majority
of `Name`s that have no aliases.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]