irrequietus / typestring

C++11/14 strings for direct use in template parameter lists, template metaprogramming.
Mozilla Public License 2.0
201 stars 2 forks source link

Use of std::size_t #3

Open adambadura opened 7 years ago

adambadura commented 7 years ago

Changes for #2.

Along the way I have also corrected tygrab in similar way. There it seems that N (the index, first template argument) would be better std::ptrdiff_t type. However that would result in mixing signed and unsigned types in same expression. While there is no real benefit as we will never use negative index anyway.

I also wonder why tygrap uses the ternary expression to make upper bound of the index. It seems static_assert would be better. Or is there a use case for such behaviour? Anyway it seems a separate topic so I didn't do anything about that.