Skip to content

Conversation

@NewYaroslav
Copy link
Owner

Motivation

  • Ensure the NTP time service uses the public C++17 detection macro so singleton storage selection is consistent across build configurations.
  • Replace a private guard that could diverge from the project's public feature macro to avoid mismatched definitions between declaration and definition.

Description

  • Replaced occurrences of the private _TIME_SHIELD_CPP17 guard with the public TIME_SHIELD_CPP17 in include/time_shield/ntp_time_service.hpp.
  • The change unifies the conditional extern/definition and the inline/static singleton paths to follow the same standard check.

Testing

  • Built and ran tests for C++11 with cmake -S . -B build-cpp11 -DCMAKE_CXX_STANDARD=11 -DTIME_SHIELD_CPP_BUILD_TESTS=ON, cmake --build build-cpp11 and ctest --test-dir build-cpp11, and all tests passed.
  • Built and ran tests for C++14 with cmake -S . -B build-cpp14 -DCMAKE_CXX_STANDARD=14 -DTIME_SHIELD_CPP_BUILD_TESTS=ON, cmake --build build-cpp14 and ctest --test-dir build-cpp14, and all tests passed.
  • Built and ran tests for C++17 with cmake -S . -B build-cpp17 -DCMAKE_CXX_STANDARD=17 -DTIME_SHIELD_CPP_BUILD_TESTS=ON, cmake --build build-cpp17 and ctest --test-dir build-cpp17, and all tests passed (100% of tests).

Codex Task

Replace the private cpp17 guard with the public macro so the NTP
service singleton storage follows the same standard check.
@NewYaroslav NewYaroslav merged commit 82e1d28 into main Dec 24, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants