CiscoDevNet / ydk-gen

Generate model-driven APIs from YANG models
http://ciscodevnet.github.io/ydk-gen/
Apache License 2.0
135 stars 74 forks source link

not_eq is a c++ keyword #1080

Closed ygorelik closed 1 year ago

ygorelik commented 1 year ago

Opened originally by ericjmonson here.

Expected Behavior

It's expected to create and compile the Cisco IOS XE yang models for C++.

Current Behavior

Yang models can't be compiled if it includes "Cisco-IOS-XE-policy.yang" since it contains an enum called "not-eq" (which is converted to not_eq ... which causes compile time issues).

not_eq is apparently a keyword in C++

Steps to Reproduce

Compile the Cisco IOS XE 17.3.5 YANG models.

Logs

ydk-gen/gen-api/cpp/cisco_ios_xe_1735-bundle/ydk/models/cisco_ios_xe_1735/fragmented/Cisco_IOS_XE_native_133.hpp:4198:39: error: expected unqualified-id before ‘not_eq’ token
         static const ydk::Enum::YLeaf not_eq;

System Information

ydkgen - 0.8.6 CentOS 7.9 - x86_64

ygorelik commented 1 year ago

Resolved to 0.8.6.4.