Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Fast Constraint Synthesis for C++ Function Templates

ACM SIGPLAN via YouTube

Overview

Coursera Flash Sale
40% Off Coursera Plus for 3 Months!
Grab it
Learn about an automatic approach to synthesizing constraints for C++ function templates in this 13-minute conference presentation from OOPSLA 2025. Discover how researchers Shuo Ding and Qirun Zhang from Georgia Institute of Technology address the problem of overly verbose and confusing C++ template error messages by developing a lightweight static analysis tool that automatically generates constraints for template parameters. Explore how their inter-procedural analysis examines usage patterns within template bodies and uses disjunctions of constraints to model function overloading, bridging the gap between C++20's constraint and concept features and the practical challenges of manually specifying template constraints in legacy projects. Examine the implementation based on the Clang frontend and its evaluation on over 110,000 lines of C++ code from the Standard Template Library's algorithm module and Boost library's special functions, processing code in under 1.5 seconds while synthesizing meaningful constraints for 30-40% of function templates. Review the results showing how synthesized constraints align with standard documentation and reduce error message lengths by an average of 56.6% for STL algorithms and 63.8% for Boost special functions, making C++ template programming more accessible and debugging more efficient for developers working with generic programming and compile-time computations.

Syllabus

[OOPSLA'25] Fast Constraint Synthesis for C++ Function Templates

Taught by

ACM SIGPLAN

Reviews

Start your review of Fast Constraint Synthesis for C++ Function Templates

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.