Re: A refactoring proposal

2017-06-18 Thread Patricia Shanahan
On 6/18/2017 5:51 AM, Carl Marcum wrote: On 06/17/2017 01:52 PM, Patricia Shanahan wrote: Without going into details here, some recently fixed security issues have related to the use of fixed size arrays without bounds checks. In general, that is not a very robust programming practice. It

Re: A refactoring proposal

2017-06-18 Thread Carl Marcum
On 06/17/2017 01:52 PM, Patricia Shanahan wrote: Without going into details here, some recently fixed security issues have related to the use of fixed size arrays without bounds checks. In general, that is not a very robust programming practice. It depends on careful checking in the source code

Re: A refactoring proposal

2017-06-18 Thread Peter Kovacs
Awesome! Thanks for the Clarification. Am 18.06.2017 um 10:19 schrieb Patricia Shanahan: In that case, we are talking about the same class. std::array is defined in header . See http://en.cppreference.com/w/cpp/container/array On 6/17/2017 9:58 PM, Peter Kovacs wrote: The book says it is in

Re: A refactoring proposal

2017-06-18 Thread Patricia Shanahan
In that case, we are talking about the same class. std::array is defined in header . See http://en.cppreference.com/w/cpp/container/array On 6/17/2017 9:58 PM, Peter Kovacs wrote: The book says it is in . The book is about C++11, providing a quick reference on C++. I cam across when I saw

Re: A refactoring proposal

2017-06-17 Thread Peter Kovacs
The book says it is in . The book is about C++11, providing a quick reference on C++. I cam across when I saw this youtube video: https://www.youtube.com/watch?v=86xWVb4XIyE And since I learned C++ in the 90ies, but never used it I thought it is a good invest. Am 18.06.2017 um 01:06 schrieb

Re: A refactoring proposal

2017-06-17 Thread Patricia Shanahan
I don't know. I have not read that particular book. If the code snippet includes "using namespace std" then "array" means "std::array". I have a time gap in my C++ experience - I used it professionally in the 1980's, and now I'm coming back to it for AOO. I don't think the Standard Template

Re: A refactoring proposal

2017-06-17 Thread Peter Kovacs
+1 I have a question thought. In Tour of C++ (Bjarn Stroustrup) its recommended to use array instead of buildin arrays and only to use Arrays if we know the amount of elements (constexpr). buildin arrays example: Circle myarray[10] array example: array myarray so std::array::at

Re: A refactoring proposal

2017-06-17 Thread Patricia Shanahan
Another useful project would indeed be warning removal. The reason for putting bounds checking ahead of it is that I have not yet seen a security bug that would have been fixed by warning removal. On 6/17/2017 3:01 PM, Matthias Seidel wrote: Hi Patricia, I am not a programmer, but looking at

Re: A refactoring proposal

2017-06-17 Thread Matthias Seidel
Hi Patricia, I am not a programmer, but looking at the screen when building AOO I see a lot of messages that make me think that the code could need a review... Your suggestion sounds very reasonable to me! Kind regards, Matthias Am 17.06.2017 um 19:52 schrieb Patricia Shanahan: > Without

A refactoring proposal

2017-06-17 Thread Patricia Shanahan
Without going into details here, some recently fixed security issues have related to the use of fixed size arrays without bounds checks. In general, that is not a very robust programming practice. It depends on careful checking in the source code to prevent array overflow. I suggest a project