From Jason Turner
Watch on YouTube

Summary

This episode explores the curious `requires requires` syntax in C++20 concepts. Jason explains that this pattern appears when making ad-hoc constraint expressions directly within a template declaration instead of defining a proper named concept. He demonstrates how `requires requires` allows checking for valid expressions (like whether a type has a call operator) inline, but notes that Bjarne Stroustrup has identified this as a code smell that suggests a missing concept definition.

Resources

Tags