Operator overloading. Looks great. Reduces verbosity. Until it doesn’t.
It’s Great That You Provide Operator Overloads, But It’s Also Nice to Have Names
by Raymond Chen
From the article:
Consider this overloaded function call operator:
struct StorageLoader { template<DataType> DataType operator()(StorageOptions<DataType> const* options); };The idea is that you can use the function call operator on a
StorageLoaderobject to load data from storage, using aStorageOptionsto describe how you want it to be loaded.

Add a Comment
Comments are closed.