Comments (1)
The _xdr_field_number
is just an integer designating which case
clause is currently selected. It is used to decide if a particular union field needs to be constructed or destructed in places like the assignment operator. It has no bearing on the actual value of the union tag, but just the order in which that case appeared. 0 is reserved for default, and -1 means error.
In short, there should be no problem using signed enums with value -1.
from xdrpp.
Related Issues (11)
- Using enum class for enums in .h files HOT 1
- It is possible to create xdr_vector<N> bigger than N HOT 1
- message_t::size does not report used buffer size HOT 1
- Free on not malloced address HOT 4
- consider moving to `enum class` when possible HOT 4
- xdrc Accepts Enum with Trailing Comma HOT 1
- Why does xdr_traits<...>::enum_values() return std::vector<int32>? HOT 1
- xdrc successfully compiles with int32_t type
- generated code is suboptimal and trips static analysis
- xdrc should support recursive types HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xdrpp.