Skip to content

[v5.0] Replace cloop auto_ptr with unique_ptr - #9202

Open
dand-oss wants to merge 1 commit into
FirebirdSQL:v5.0-releasefrom
dand-oss:fix/v5-cloop-unique-ptr
Open

dand-oss wants to merge 1 commit into
FirebirdSQL:v5.0-releasefrom
dand-oss:fix/v5-cloop-unique-ptr

Conversation

@dand-oss

@dand-oss dand-oss commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Use std::unique_ptr for cloop's local Generator owner. The pointer is only default-constructed, reset and dereferenced, so it does not require auto_ptr's transfer-on-copy behavior. unique_ptr also removes reliance on a facility removed from the C++ standard in C++17.

Master already uses unique_ptr after the cloop update in 30d835a; this small compatibility change targets v5.0-release and retains C++11 support.

Validation on Linux x86-64 with GCC 16.2:

  • Built all six cloop source files before the change in C++11 mode.
  • Built all six patched source files in C++11 and C++23 modes, with deprecated declarations treated as errors.
  • The original and both patched binaries produce byte-for-byte identical test C headers, test C++ headers, and the Firebird IdlFbInterfaces.h header (675,564 bytes).
  • git diff --check passes.

Windows validation and a complete Firebird 5 server build have not been run locally.

std::auto_ptr was deprecated in C++11 and removed in C++17.
Modern MSVC defaults to C++17 or later.
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.

1 participant