avro-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [avro] thiru-mg commented on a change in pull request #1106: Core C++ implementation is modernized
Date Mon, 01 Mar 2021 04:02:16 GMT

thiru-mg commented on a change in pull request #1106:
URL: https://github.com/apache/avro/pull/1106#discussion_r584433746



##########
File path: lang/c++/api/NodeConcepts.hh
##########
@@ -47,33 +47,29 @@ namespace avro {
 
 namespace concepts {
 
-template <typename Attribute>
-struct NoAttribute
-{
+template<typename Attribute>
+struct NoAttribute {
     static const bool hasAttribute = false;
 
     size_t size() const {
         return 0;
     }
 
-    void add( const Attribute &attr) {
+    void add(const Attribute &attr) {

Review comment:
       This is because `NoAttribute` is passed to some template which would call `add` on
it conditionally. The condition is never met for this specific type and hence this exception
is never seen. But the compiler would complain without this function. Not a great design,
but we have it.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message