Details
-
Bug
-
Resolution: Unresolved
-
Major - P3
-
None
-
None
-
Service Arch
-
ALL
-
4
Description
It appears that specifying {inline_chained_structs: true} leads the generated comparison operators to attempt to directly compare the member variables which exist on the chained struct despite them being on a different type.
structs:
|
One:
|
description: ""
|
generate_comparison_operators: true
|
fields:
|
one: int
|
|
|
Two:
|
description: ""
|
inline_chained_structs: true
|
chained_structs:
|
One: OneStruct
|
generate_comparison_operators: true
|
fields:
|
two: int
|
class Two { |
public: |
...
|
friend bool operator==(const Two& left, const Two& right) { |
return left._oneStruct == right._oneStruct && left._one == right._one && left._two == right._two; |
}
|
...
|
private: |
mongo::One _oneStruct;
|
std::int32_t _two;
|
bool _hasTwo : 1; |
};
|
Attachments
Issue Links
- is related to
-
SERVER-31705 IDL should automatically create == and != operators
-
- Closed
-