Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumC++concepts basicsSingle-choice MCQ

What is the effect of the `requires` clause here, and when is the constraint checked?

template <typename T> requires std::integral<T> T half(T x) { return x / 2; } half(3.0); // double argument