views:

81

answers:

3

I'm documenting some code in C++ right now, and one of the methods I intend to write will sort an array. It won't create a new array, though, it will sort the elements of the given array in place. I want to include a remark along the lines of, "if the original ordering was important to you, then don't use this method!" But I would rather say something like "sorts the given array... statically?!... dangerously!... with mutations!!!" that programmers like you would be able understand.

What word describes this sort of method?

Bonus question: can anyone recommend a tool for C++ that creates HTML documentation from specially formatted comments, like javadoc? My operating system of choice is Ubuntu.

Edit: I'm a student and my assignment is to sort.

+8  A: 

Sorts the given array in-place.

You are aware of std::sort and std::stable_sort, right?

James McNellis
+3  A: 

Isn't it obvious that a function modifies parameters because they are passed in as non-const references? (Shameless plug: see this answer for what the exact parameter type signifies.)

And you're looking for doxygen.

sbi
I'm a student: we comment everything!
Ziggy
A: 

You already said it: the correct term is "mutator".

Bob