Skip to content

Replace deprecated boost functions - #528

Open
lo-simon wants to merge 2 commits into
sony:masterfrom
lo-simon:fix/replace-deprecated-Boost-functions
Open

lo-simon wants to merge 2 commits into
sony:masterfrom
lo-simon:fix/replace-deprecated-Boost-functions

Conversation

@lo-simon

Copy link
Copy Markdown
Collaborator

Replace deprecated Boost.Asio functions (buffer_cast/buffer_size, io_service, expires_from_now, reset) with version-gated modern equivalents, ready for use when a newer version of Boost is expected via the newer version of the cpprestsdk

  • Use a consistent version-gate pattern (#if BOOST_VERSION >= 106600 ... #else ... #endif) for maintainability and readability across the branch.
  • Target the correct Boost version cutoff (1.66.0) - this is indeed when Asio introduced io_context, expires_after()/expires_at(), restart(), and const_buffer::data()/size() as the modern, non-deprecated replacements.
  • Preserve backward compatibility with your project's stated minimum Boost version (1.54.0 per NmosCppDependencies.cmake), which is important since older Boost versions don't have these newer APIs at all.
  • No behavioural changes - each replacement is a drop-in equivalent for the respective Boost version.

…service, expires_from_now, reset) with version-gated modern equivalents
…Older Boost versions (less than 1.69.0) still require the compiled 'system' binary.
@lo-simon lo-simon changed the title Fix/replace deprecated boost functions Replace deprecated boost functions Oct 29, 2026
@garethsb

Copy link
Copy Markdown
Contributor

Looks good. Would it be worth having at least temporarily CI jobs with both older and newer Boost? Or is that too much machinery?

@lo-simon

Copy link
Copy Markdown
Collaborator Author

Looks good. Would it be worth having at least temporarily CI jobs with both older and newer Boost? Or is that too much machinery?

Let's see what I can do; I think I will need to build cpprestsdk using older Boost without Canon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants