diff --git a/CMakeLists.txt b/CMakeLists.txt index 9702844ed..9e9f47c93 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -254,7 +254,7 @@ macro(ADD_CXX_COMPILER_FLAG_IF_AVAILABLE flag have) endmacro(ADD_CXX_COMPILER_FLAG_IF_AVAILABLE) if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-comment -Wno-reorder -Wno-unused-but-set-variable -Wno-unused-variable -Wformat -Wmissing-field-initializers -Wtype-limits -std=c++03") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-comment -Wno-reorder -Wno-unused-but-set-variable -Wno-unused-variable -Wtype-limits -std=c++11") find_package(SSE) if (HAVE_AVX2) diff --git a/lib/include/srslte/radio/radio.h b/lib/include/srslte/radio/radio.h index e00a5afe5..ebeabf10e 100644 --- a/lib/include/srslte/radio/radio.h +++ b/lib/include/srslte/radio/radio.h @@ -150,13 +150,13 @@ class radio { // Define default values for known radios bool tx_adv_auto; bool tx_adv_negative; - const static double uhd_default_burst_preamble_sec = 600 * 1e-6; - const static double uhd_default_tx_adv_samples = 98; - const static double uhd_default_tx_adv_offset_sec = 4 * 1e-6; + constexpr static double uhd_default_burst_preamble_sec = 600 * 1e-6; + constexpr static double uhd_default_tx_adv_samples = 98; + constexpr static double uhd_default_tx_adv_offset_sec = 4 * 1e-6; - const static double blade_default_burst_preamble_sec = 0.0; - const static double blade_default_tx_adv_samples = 27; - const static double blade_default_tx_adv_offset_sec = 1e-6; + constexpr static double blade_default_burst_preamble_sec = 0.0; + constexpr static double blade_default_tx_adv_samples = 27; + constexpr static double blade_default_tx_adv_offset_sec = 1e-6; double tx_freq, rx_freq, freq_offset; @@ -177,6 +177,7 @@ class radio { char saved_devname[128]; }; -} + +} // namespace srslte #endif // SRSLTE_RADIO_H diff --git a/srsenb/hdr/phy/phch_worker.h b/srsenb/hdr/phy/phch_worker.h index 7e3c428d8..8af1fab65 100644 --- a/srsenb/hdr/phy/phch_worker.h +++ b/srsenb/hdr/phy/phch_worker.h @@ -66,11 +66,10 @@ public: uint32_t get_metrics(phy_metrics_t metrics[ENB_METRICS_MAX_USERS]); -private: - - const static float PUSCH_RL_SNR_DB_TH = 1.0; - const static float PUCCH_RL_CORR_TH = 0.15; - +private: + constexpr static float PUSCH_RL_SNR_DB_TH = 1.0; + constexpr static float PUCCH_RL_CORR_TH = 0.15; + void work_imp(); int encode_pdsch(srslte_enb_dl_pdsch_t *grants, uint32_t nof_grants); diff --git a/srsue/hdr/phy/phch_recv.h b/srsue/hdr/phy/phch_recv.h index 44402d5e7..e9f1bef5a 100644 --- a/srsue/hdr/phy/phch_recv.h +++ b/srsue/hdr/phy/phch_recv.h @@ -237,7 +237,7 @@ private: }; // 36.133 9.1.2.1 for band 7 - const static float ABSOLUTE_RSRP_THRESHOLD_DBM = -125; + constexpr static float ABSOLUTE_RSRP_THRESHOLD_DBM = -125; std::vector earfcn;