tfussell / xlnt

:bar_chart: Cross-platform user-friendly xlsx library for C++11+
Other
1.45k stars 406 forks source link

C++23 - fails to compile optional.hpp --> use of std::aligned_storage is deprecated #661

Open Blakjak88 opened 2 years ago

Blakjak88 commented 2 years ago

Just tried to re-compile my code which has been using XLNT fine for quite a while (>1yr) and suddenly am getting these deprecated errors on line 329 of "optional.hpp" which uses std::aligned_storage<>

Here is a Stackoverflow post of the problem and possible solution. [https://stackoverflow.com/questions/71828288/why-is-stdaligned-storage-to-be-deprecated-in-c23-and-what-to-use-instead]

I am not familiar with using std::aligned_storage so cannot propose a solution today, but perhaps this is something you can consider fixing for future versions.

ThibaultDECO commented 1 year ago

You could implement it yourself (see here) or use a deprecated version (I use std::_Aligned_storage).