zeroc-ice / ice

All-in-one solution for creating networked applications with RPC, pub/sub, server deployment, and more.
https://zeroc.com
GNU General Public License v2.0
2k stars 592 forks source link

Use optional type for Reference compress #2368

Open pepone opened 3 days ago

pepone commented 3 days ago
          It would be cleaner to use a `bool?` here.

_Originally posted by @bernardnormier in https://github.com/zeroc-ice/ice/pull/2366#discussion_r1657837589_

bernardnormier commented 2 days ago

We should do the same in C++ with a std::optional<bool>. See:

https://github.com/zeroc-ice/ice/blob/69a59072e496c2e13d1cfe79baf779905f731e6e/cpp/src/Ice/Reference.h#L160 and https://github.com/zeroc-ice/ice/blob/69a59072e496c2e13d1cfe79baf779905f731e6e/cpp/src/Ice/Reference.h#L61