Does the following code structure or design implementation have an Idiomatic Name?
问题 Within the C++ language, many will come across various design patterns that have a designated name in which we would call an Idiom, such as SFINAE , RAII , CRTP , Polymorphism , etc... Consider this following code snippet in its most basic form... template<typename T> auto make_object = [](T val) { class Foo { public: Foo(T val) : value_{val} {} T value() const { return value_; } private: T value_; }; Foo foo(val); return foo; }; // in some other code block, scope, or translation int main() {