Skip to content

Conversation

@OlegGalizin
Copy link
Contributor

@OlegGalizin OlegGalizin commented Mar 3, 2025

By
https://en.cppreference.com/w/cpp/error/exception
Each standard library class T that derives from std::exception has the following publicly accessible member functions, each of them do not exit with an exception(until C++11)having a non-throwing exception specification(since C++11): copy_constructor

For copy unique_ptr we must allocate new space and copy object into one. The allocation can throw exception. So we cannot use unique_ptr.

I change it to shared_ptr that works without memory allocation in copy constructor.

@Enmk Enmk merged commit 449161c into ClickHouse:master Apr 1, 2025
16 checks passed
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