-
Notifications
You must be signed in to change notification settings - Fork 133
Adopt modern C++ and get rid of C style coding #6495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thank you for the suggestions. We have two cases where we will use C style APIs and arrays. The first case occurs when we interact with libCURL, AMQP, WinHTTP and other C libraries - since we are interacting with C libraries, we have no choice but to use C style constructs. The other case which is intentionally made involves static constant C style strings are typically safe, and more importantly, if they were converted to C++ style strings, it would require runtime initialization of the strings at process startup. It is not clear that there is any additional safety associated with converting strings from static C style strings to c++ strings (and because we have standardized on C++ 14 we cannot use If there are other examples of us using C style strings in our public API surface, or in our C++ only code, we absolutely should fix them. It would be appreciated if you could help us out by pointing cases where we are using C style strings in our codebase. |
Hi @pjmlp. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue. |
Hi, these was the kind of code that caught my attention,
azure-sdk-for-cpp/sdk/storage/azure-storage-common/inc/azure/storage/common/internal/xml_wrapper.hpp Line 41 in 27c2e5d
|
In the ongoing discussion of safety in C++ code bases, it is a bit strange that at the light of Microsoft initiatives like Secure Future Initiative and Azure's security initiatives, as mentioned on Microsoft Azure security evolution: Embrace secure multitenancy, Confidential Compute, and Rust, that Azure C++ SDK still exposes several C like code patterns like C style strings and arrays, instead of safer C++ standard types.
The text was updated successfully, but these errors were encountered: