RisinT96 opened a new pull request, #3793:
URL: https://github.com/apache/fory/pull/3793

   ## Why?
   
   `std::aligned_storage` is marked as deprecated in C++23, as can be seen in 
the following compilation warning:
   ```
   <project>/build/_deps/fory-src/cpp/fory/util/result.h:325:21: warning: 
‘template<long unsigned int _Len, long unsigned int _Align> struct 
std::aligned_storage’ is deprecated [-Wdeprecated-declarations]
      325 |       typename std::aligned_storage<sizeof(E), alignof(E)>::type;
          |                     ^~~~~~~~~~~~~~~
    In file included from /usr/include/c++/13/bits/move.h:37,
                     from /usr/include/c++/13/bits/atomic_base.h:39,
                     from /usr/include/c++/13/atomic:41,
                     from <project source file>:
    /usr/include/c++/13/type_traits:2099:5: note: declared here
     2099 |     aligned_storage
   ```
   
   ## What does this PR do?
   
   Replaces `std::aligned_storage` with a `std::byte` array enclosed in an 
aligned struct.
   
   * `std::byte` is available since C++17 - the minimum supported version by 
fory.
   * `alignas` is available since C++11
   
   This change shouldn't break anything.
   
   ## AI Contribution Checklist
   
   - [ ] Substantial AI assistance was used in this PR: no
   
   ## Does this PR introduce any user-facing change?
   
   - [ ] Does this PR introduce any public API change?
   - [ ] Does this PR introduce any binary protocol compatibility change?
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to