mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-05-13 01:44:10 -04:00
Canvas is a move-only type without a copy constructor. Since C++17 requires types stored in std::optional to be copy-constructible unless explicitly allowed, Clang 20+ emits an error when attempting to instantiate std::optional<Canvas>. While GCC allows this as an extension, Clang enforces the standard more strictly. This PR replaces std::optional<Canvas> with std::unique_ptr<Canvas> to resolve the build error with Clang 20+ while keeping functional behavior identical. Tested with GCC 15.1.0 and Clang 20.1.7. Co-Authored-By: Ryan Foster <ryan@obsproject.com>
2.5 KiB
2.5 KiB