René's URL Explorer Experiment


Title: Expand template argument type deduction by pfultz2 · Pull Request #8688 · cppcheck-opensource/cppcheck · GitHub

Open Graph Title: Expand template argument type deduction by pfultz2 · Pull Request #8688 · cppcheck-opensource/cppcheck

X Title: Expand template argument type deduction by pfultz2 · Pull Request #8688 · cppcheck-opensource/cppcheck

Description: Previously we only did type deduction when the argument that was passed was a literal(ie f(0)). This expands this to handle variables and expressions. There is no varid/SymbolDatabase/ValueType information at the TemplateSimplifier stage so it uses a token-based parsing to try and deduce the type. If it can deduce the type then it will skip instantiating the function. There is still a lot of gaps here that could be addressed in the future. Ideally, I would like to see if the logic from SymbolDatabase/ValueType could be reused here using a shared utility.

Open Graph Description: Previously we only did type deduction when the argument that was passed was a literal(ie f(0)). This expands this to handle variables and expressions. There is no varid/SymbolDatabase/ValueType inf...

X Description: Previously we only did type deduction when the argument that was passed was a literal(ie f(0)). This expands this to handle variables and expressions. There is no varid/SymbolDatabase/ValueType inf...

Opengraph URL: https://github.com/cppcheck-opensource/cppcheck/pull/8688

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:b9cd4f78-69ca-8f76-849c-3e10874af187
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD108:34CBC3:118750F:18FC80D:6A4CBE67
html-safe-noncec11ade6a21ea4260336e16818a962f565617ddfa2600fc78c6cdd1c53b9eacad
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMTA4OjM0Q0JDMzoxMTg3NTBGOjE4RkM4MEQ6NkE0Q0JFNjciLCJ2aXNpdG9yX2lkIjoiMzY1NTc3ODg2MTY1NDUyMzQ5NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac67782d8f68a96ea703b17612d58fe18cfb1acca482658563aa7b2d1b9456773b
hovercard-subject-tagpull_request:3982027388
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/cppcheck-opensource/cppcheck/pull/8688/files
twitter:imagehttps://avatars.githubusercontent.com/u/1306044?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/1306044?s=400&v=4
og:image:altPreviously we only did type deduction when the argument that was passed was a literal(ie f(0)). This expands this to handle variables and expressions. There is no varid/SymbolDatabase/ValueType inf...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None3d11bb817438277de2a940854450e83a7d32b6aeb5014e9e6b00a6423900251c
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/cppcheck-opensource/cppcheck git https://github.com/cppcheck-opensource/cppcheck.git
octolytics-dimension-user_id278097703
octolytics-dimension-user_logincppcheck-opensource
octolytics-dimension-repository_id143131
octolytics-dimension-repository_nwocppcheck-opensource/cppcheck
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id143131
octolytics-dimension-repository_network_root_nwocppcheck-opensource/cppcheck
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasec03e7e569190bc89b638cdd4acb4b6c6b38a170a
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/cppcheck-opensource/cppcheck/pull/8688/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcppcheck-opensource%2Fcppcheck%2Fpull%2F8688%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcppcheck-opensource%2Fcppcheck%2Fpull%2F8688%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=cppcheck-opensource%2Fcppcheck
Reloadhttps://github.com/cppcheck-opensource/cppcheck/pull/8688/files
Reloadhttps://github.com/cppcheck-opensource/cppcheck/pull/8688/files
Reloadhttps://github.com/cppcheck-opensource/cppcheck/pull/8688/files
Please reload this pagehttps://github.com/cppcheck-opensource/cppcheck/pull/8688/files
cppcheck-opensource https://github.com/cppcheck-opensource
cppcheckhttps://github.com/cppcheck-opensource/cppcheck
Notifications https://github.com/login?return_to=%2Fcppcheck-opensource%2Fcppcheck
Fork 1.6k https://github.com/login?return_to=%2Fcppcheck-opensource%2Fcppcheck
Star 6.7k https://github.com/login?return_to=%2Fcppcheck-opensource%2Fcppcheck
Code https://github.com/cppcheck-opensource/cppcheck
Pull requests 206 https://github.com/cppcheck-opensource/cppcheck/pulls
Actions https://github.com/cppcheck-opensource/cppcheck/actions
Security and quality 0 https://github.com/cppcheck-opensource/cppcheck/security
Insights https://github.com/cppcheck-opensource/cppcheck/pulse
Code https://github.com/cppcheck-opensource/cppcheck
Pull requests https://github.com/cppcheck-opensource/cppcheck/pulls
Actions https://github.com/cppcheck-opensource/cppcheck/actions
Security and quality https://github.com/cppcheck-opensource/cppcheck/security
Insights https://github.com/cppcheck-opensource/cppcheck/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fcppcheck-opensource%2Fcppcheck%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fcppcheck-opensource%2Fcppcheck%2Fissues%2Fnew%2Fchoose
pfultz2https://github.com/pfultz2
cppcheck-opensource:mainhttps://github.com/cppcheck-opensource/cppcheck/tree/main
pfultz2:template-type-deductionhttps://github.com/pfultz2/cppcheck/tree/template-type-deduction
Conversation 4 https://github.com/cppcheck-opensource/cppcheck/pull/8688
Commits 19 https://github.com/cppcheck-opensource/cppcheck/pull/8688/commits
Checks 70 https://github.com/cppcheck-opensource/cppcheck/pull/8688/checks
Files changed 6 https://github.com/cppcheck-opensource/cppcheck/pull/8688/files
Expand template argument type deduction https://github.com/cppcheck-opensource/cppcheck/pull/8688/files#top
Show all changes 19 commits https://github.com/cppcheck-opensource/cppcheck/pull/8688/files
2c68b09 Add template type deduction Jul 2, 2026 https://github.com/cppcheck-opensource/cppcheck/pull/8688/commits/2c68b095506b87dca0268cb1d2db22e0bef7acbb
eecd903 Simplify Jul 2, 2026 https://github.com/cppcheck-opensource/cppcheck/pull/8688/commits/eecd90314f77f152afb01980a6221c152a6c2924
a43039a Use a forward walk Jul 2, 2026 https://github.com/cppcheck-opensource/cppcheck/pull/8688/commits/a43039ab6b1b712e11841ea919bbcc8b519785ee
695de6e Handle global function template called from a class scope Jul 2, 2026 https://github.com/cppcheck-opensource/cppcheck/pull/8688/commits/695de6ecff157dd5dd1f695f4db83e5307a66beb
b60e55e Improve member functions Jul 2, 2026 https://github.com/cppcheck-opensource/cppcheck/pull/8688/commits/b60e55ee3b36720a5de241b7b9bce2959ebf859b
de77bc6 Handle late class members Jul 2, 2026 https://github.com/cppcheck-opensource/cppcheck/pull/8688/commits/de77bc6dad1c878939e0b558fd16bfa3e2fca5ee
90c62dc Handle overloading better Jul 2, 2026 https://github.com/cppcheck-opensource/cppcheck/pull/8688/commits/90c62dc5b5cf596ae6c49616c6e79e4b25b81596
5ad01ad Simplify and add unit tests Jul 2, 2026 https://github.com/cppcheck-opensource/cppcheck/pull/8688/commits/5ad01adec3bce3564879228d0a6a0c8a0c3c21d5
965281d Improve comments Jul 2, 2026 https://github.com/cppcheck-opensource/cppcheck/pull/8688/commits/965281d8c192eec1bfc1efc5b6264faa148a2e1b
d966681 Avoid output params Jul 2, 2026 https://github.com/cppcheck-opensource/cppcheck/pull/8688/commits/d966681ebf05962f879ef4f126ba5acd44dd0b49
f64190d Format Jul 2, 2026 https://github.com/cppcheck-opensource/cppcheck/pull/8688/commits/f64190d041da29f2556d91089ab7459a68548d82
81da87b Use stl algorithm Jul 2, 2026 https://github.com/cppcheck-opensource/cppcheck/pull/8688/commits/81da87b04d4f155fe703733808ff1ba2518df816
9b554ac Format Jul 2, 2026 https://github.com/cppcheck-opensource/cppcheck/pull/8688/commits/9b554ac5450f1124076c5d1d8b7a48f290adc099
35e830a Fix selfcheck Jul 3, 2026 https://github.com/cppcheck-opensource/cppcheck/pull/8688/commits/35e830a1bdf85508c6271ed9df5e88f8f41621dd
770eeb9 Remvoe unnecessary move Jul 3, 2026 https://github.com/cppcheck-opensource/cppcheck/pull/8688/commits/770eeb9c5d4554e97d0f9cffbab55e60b9dcc38c
0e81fca Add test for 13630 Jul 3, 2026 https://github.com/cppcheck-opensource/cppcheck/pull/8688/commits/0e81fcaebb496eafe943bd2e560fe38e8aa0048b
e87f8d7 Format Jul 3, 2026 https://github.com/cppcheck-opensource/cppcheck/pull/8688/commits/e87f8d7b7e063070027113ad8f012f67b38155be
9933641 Suppress unmatchedSuppression Jul 4, 2026 https://github.com/cppcheck-opensource/cppcheck/pull/8688/commits/9933641625ead5301b483ac304cc6e61d91ffc32
6dab97d Merge Jul 5, 2026 https://github.com/cppcheck-opensource/cppcheck/pull/8688/commits/6dab97d2f839407e2d9803ebf6887f79041f8517
Clear filters https://github.com/cppcheck-opensource/cppcheck/pull/8688/files
Please reload this pagehttps://github.com/cppcheck-opensource/cppcheck/pull/8688/files
Please reload this pagehttps://github.com/cppcheck-opensource/cppcheck/pull/8688/files
.selfcheck_suppressions https://github.com/cppcheck-opensource/cppcheck/pull/8688/files#diff-0029735cbf6457344008fb0691f75e5f265bbd8aff54ecae28877ec2eeeb3d29
templatesimplifier.cpp https://github.com/cppcheck-opensource/cppcheck/pull/8688/files#diff-0a9ab01d77dec9fb9d0525110364e6aa80500eba0f61db0e4c959a9240a8ef0e
templatesimplifier.h https://github.com/cppcheck-opensource/cppcheck/pull/8688/files#diff-97b2ec5c98362ddf09b424dc64b347a0df24703ce6bc5edcedac5a499a8acd46
utils.h https://github.com/cppcheck-opensource/cppcheck/pull/8688/files#diff-839661285af55d5134633b32ce8d2bd2a244939148620ee53b1fa97e5534bac6
testcondition.cpp https://github.com/cppcheck-opensource/cppcheck/pull/8688/files#diff-68bc312feeaa3108fa71f065b51bc1096f0ddbf41b39525d7499d0ade94467c8
testsimplifytemplate.cpp https://github.com/cppcheck-opensource/cppcheck/pull/8688/files#diff-8b915fc54a38f191e0887fd5cc69f96cb256df2d1985fa0465665f1438310189
.selfcheck_suppressionshttps://github.com/cppcheck-opensource/cppcheck/pull/8688/files#diff-0029735cbf6457344008fb0691f75e5f265bbd8aff54ecae28877ec2eeeb3d29
View file https://github.com/cppcheck-opensource/cppcheck/blob/6dab97d2f839407e2d9803ebf6887f79041f8517/.selfcheck_suppressions
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/cppcheck-opensource/cppcheck/pull/8688/{{ revealButtonHref }}
https://github.com/cppcheck-opensource/cppcheck/pull/8688/files#diff-0029735cbf6457344008fb0691f75e5f265bbd8aff54ecae28877ec2eeeb3d29
firewavehttps://github.com/firewave
Jul 3, 2026https://github.com/cppcheck-opensource/cppcheck/pull/8688/files#r3520888053
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/cppcheck-opensource/cppcheck/pull/8688/files
pfultz2https://github.com/pfultz2
Jul 3, 2026https://github.com/cppcheck-opensource/cppcheck/pull/8688/files#r3520917346
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/cppcheck-opensource/cppcheck/pull/8688/files
firewavehttps://github.com/firewave
Jul 3, 2026https://github.com/cppcheck-opensource/cppcheck/pull/8688/files#r3520946390
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/cppcheck-opensource/cppcheck/pull/8688/files
https://github.com/cppcheck-opensource/cppcheck/pull/8688/files#diff-0029735cbf6457344008fb0691f75e5f265bbd8aff54ecae28877ec2eeeb3d29
Please reload this pagehttps://github.com/cppcheck-opensource/cppcheck/pull/8688/files
Please reload this pagehttps://github.com/cppcheck-opensource/cppcheck/pull/8688/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.