Fix GCC 15 Build Error - Incomplete Type in std::unique_ptr#1025
Merged
mfisher31 merged 1 commit intokushview:mainfrom Dec 31, 2025
Merged
Fix GCC 15 Build Error - Incomplete Type in std::unique_ptr#1025mfisher31 merged 1 commit intokushview:mainfrom
mfisher31 merged 1 commit intokushview:mainfrom
Conversation
Member
|
Thanks, surprised the forward declare wasn't working since the ContentFactory isn't actually used in the header. I'll take it!!! Thanks again. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
1. What Has Been Changed
Added
#include <element/ui/content.hpp>to include/element/application.hpp to provide the complete definition of ContentFactory before its use withstd::unique_ptr.2. Why It Has Been Changed / Points Addressed
Issue: Build failure on Fedora 43 with GCC 15:
Root Cause: The Application::createContentFactory() method returns
std::unique_ptr<ContentFactory>initialized withnullptr. When constructing thisunique_ptr, the compiler instantiatesstd::default_delete<ContentFactory>, which requires the complete type definition. Previously, only a forward declaration was available at that point.Standard Compliance: GCC 15 enforces the C++ standard requirement more strictly than older compilers. The standard requires complete types for
std::unique_ptrdeleters, though some compilers were more lenient.3. Test Recommendations / Test Ideas