Comment on Revisiting the principles of data-oriented programmingparentComments−oivey4yAhh you’re, right, I forgot about fully auto’d functions. I think want more structure than just auto everything, although the compilers should find mistakes with that. Concepts will be nice.−jcelerier4yThe concept version here would look like: template<typename T> concept WesternishName = requires (T t) { { t.firstName } -> convertible_to<string>; { t.lastName } -> convertible_to<string>; }; auto concatenate(WesternishName auto t) { return t.firstName + " " + t.lastName; }
Comments
Ahh you’re, right, I forgot about fully auto’d functions. I think want more structure than just auto everything, although the compilers should find mistakes with that. Concepts will be nice.
The concept version here would look like: