Hi all,

Currently, the API of pulsar-client-cpp conforms to the C++11
standard, which was approved 14 years ago [1]. C++11 is used mainly
because it's the highest standard supported by GCC 4.8 in CentOS 7,
which has already reached the EOL in June 2024.

C++11 is a bit too old now:
- `std::optional` (from C++17) is not supported, it makes some APIs
ugly, e.g. using an empty `std::string` to represent the null semantic
- We have to pin the protobuf dependency to 3.21.12 because the higher
version protobuf libraries require at least C++14

Mainstream linux distros already have GCCs that support C++17 for
example, the manylinux2014 image for Python library build has GCC 10,
which even supports C++20.

I proposed to upgrade to C++17 first to get benefits from improvements
on lambda expressions, std::optional, std::string_view for now.

[1] https://en.cppreference.com/w/cpp/11.html
[2] https://github.com/protocolbuffers/protobuf/issues/12393

Thanks,
Yunze

Reply via email to