-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
STL compatible size(), dimensions() return size_t #357
Comments
This sounds great. Its always nice to be compatible with the standard library. |
I agree. Anything related to size ... or indexes for that matter, should be size_t. There is a nupic::Size type but it is not consistently used. |
good point, should we use |
Well, for what it is worth, Cereal uses an Let's just use size_t. |
from #372 (comment) , @dkeeney
yes, although I'd like to advocate against that.
|
A coding-style proposal:
our new code will be STL compatible and
size()
,dimensions()
, capacity, etc will returnsize_t
value;
Current:
we use UInt or certain type that is used in the container (eg
vector<char>()::size()
we'd cast to char.New: STL uses size_type (size_t, ulong)
Motivation: in PR #331 I'm playing with changing back-end data-types for containers. We get incompatibilities with other parts in the code on each change, deciding on size_t would fix this.
The text was updated successfully, but these errors were encountered: