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
StorageLoader
object to load data from storage, using aStorageOptions
to describe how you want it to be loaded.
Add a Comment
Comments are closed.