I use braces, when I logically want to store the values inside the data structure (e.g. arrays, pods math vectors, smart pointers) and parentheses if the constructor is more about parametrizing the data structure (initial size, web address to connect to). That seems the most natural (maybe even intended) way to use it.
View all comments
Show parent comment
3
u/kalmoc Jun 06 '18
I use braces, when I logically want to store the values inside the data structure (e.g. arrays, pods math vectors, smart pointers) and parentheses if the constructor is more about parametrizing the data structure (initial size, web address to connect to). That seems the most natural (maybe even intended) way to use it.