Handle templates with implicit constructors and destructors
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Start with the explicit-instantiation examples in QtCore-symbols.cpp and the StringResult declaration in qcborstream.h, then review the linked explanation of implicit constructors and destructors. The issue is done only once the project has a decided, tested behavior for these templates, such as warning the user or mapping them to C# structures without native symbols.
Written by the indexing model from the issue text.
Description
Code such as:
template <typename Container> struct StringResult {
Container data;
StringResultCode status = Error;
};
template struct QCborStreamReader::StringResult<QString>;
yields no symbols for constructors or destructors. Code such as:
template QCborStreamReader::StringResult<QString>::StringResult();
, on the other hand, produces this error:
QtCore-symbols.cpp:6142:52: error: explicit instantiation refers to member function 'QCborStreamReader::StringResult<QString>::StringResult' that is not an instantiation
qcborstream.h:149:42: note: explicit instantiation refers here
The explanation is here. This means we can do nothing to get the symbols and look for some other way. We could warn the user, or map such classes to simple C# structures so that native code is never involved.
- Dominant language
- C#
- Stars
- 3.4k
- Forks
- 541
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from mono/CppSharp
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
How to get started Open
Difficulty 3/5 1-2 days Newbie friendliness 38/100
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
:watch: Not Triaged 11.0 fundamentals/subsvc
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
dotnet/AspNetCore.Docs#37699 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
SubtitleEdit/subtitleedit#15108 · 1 comment ·
-
area/docs-content Bug pulumi/docs
Difficulty 1/5 1-3 hours Newbie friendliness 94/100
-
agentic-workflows untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 76/100