
More subjectively, I prefer Rob's suggested endian_cast to swap. I don't associate this operation with swapping, and indeed in some cases there is no swapping involved.
Thanks John. I am not married to the names in the current version of the code. I liked the earlier suggestion to rename "swap_in_place" to "swap" and the current "swap" to "swap_copy". But I am not totally opposed to endian::cast<> either. Names are a very subjective thing and I think it will become clearer which ones are preferable as I/others write/use the library. I will also be the first to admit that even though I try and come up with descriptive names, they are usually far from perfect, so this feedback is useful. Actually, now that I think about it, the cast<> notation may allow me to unify the swap/to/from functions into a single form: endian::cast<big_to_host>() //explicit direction endian::cast<from_litle>() //"to_host" is implicit endian::cast<to_big>() //"from_host" is implicit I actually really like that. What do you think? Tom