Hello Team,
We need code base which is compatible to C++98/C++03 compiler?
The latest version 2.17.1 of Datastax C++ driver is not compatible with C++03 compiler as it has code specific to C++11.
One of the compilation error we have got is as listed below:
Error:
/workarea/MM/EM21_3PP_LCM/EM21.11/cassandra/cpp-driver-2.17.1/src/metrics.hpp: In constructor 'datastax::internal::core::Metrics::Histogram::Histogram(datastax::internal::core::Metrics::ThreadState*, unsigned int)':
/workarea/MM/EM21_3PP_LCM/EM21.11/cassandra/cpp-driver-2.17.1/src/metrics.hpp:275:35: error: extended initializer lists only available with -std=c++11 or -std=gnu++11 [-Werror]
, zero_snapshot_(Snapshot {0,0,0,0,0,0,0,0,0,0}) {
^
cc1plus: all warnings being treated as errors
make[2]: *** [src/CMakeFiles/cassandra.dir/build.make:230: src/CMakeFiles/cassandra.dir/client_insights.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:191: src/CMakeFiles/cassandra.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
###########################################################################################################################3
Cassandra CPP driver (2.17.1) having code specific to C++11 :
Histogram(ThreadState* thread_state, unsigned refresh_interval = CASS_DEFAULT_HISTOGRAM_REFRESH_INTERVAL_NO_REFRESH)
: thread_state_(thread_state)
, histograms_(new PerThreadHistogram[thread_state->max_threads()])
, zero_snapshot_(Snapshot {0,0,0,0,0,0,0,0,0,0}) {
refresh_interval_ = refresh_interval;
refresh_timestamp_ = get_time_since_epoch_ms();
cached_snapshot_ = zero_snapshot_;
hdr_init(1LL, HIGHEST_TRACKABLE_VALUE, 3, &histogram_);
uv_mutex_init(&mutex_);
}
Regards
Sonal Sharma