1 Conversion function naming bikeshed
3 return-by-value modify-argument
4 ------------------ ---------------
6 reverse_endianness reverse_endianness_in_place
7 " reverse_endianness_arg
8 endian_reverse endian_reverse_in_place
9 " endian_reverse_inplace
10 " endian_reverse_replace
11 " endian_reverse_in_situ
18 reverse reverse_in_place
19 reverse_endian reverse_endian_in_place
21 swap_endianness swap_endianness_in_place
22 swap_endian swap_endian_in_place
23 endian_swap endian_swap_this
25 flip_endianness flip_endianness_in_place
26 flip_endian flip_endian_in_place
27 endian_flip endian_flip_in_place
30 reverse_order reverse_order_in_place
35 * The above names are defined in a user namespace as customization points to be found by
36 ADL, and so cannot depend on the enclosing namespace name to signal readers that they
37 are related to endianness.
38 * The above functions are rarely called directly by user code, which is more likely to use
39 the various conditional functions instead. So explicitness is more important than
44 big_to_native native_to_big little_to_native native_to_little
46 big_to_host host_to_big
52 big_to_native big_to_native
53 native_to_big native_to_big
55 conditional_reverse runtime_conditional_reverse
56 conditional_reverse conditional_reverse <------
58 merriam-webster.com/dictionary
60 reverse [1] (adjective): opposite or contrary to a previous or normal condition <reverse order>
61 reverse [2] (verb) : to change (something) to an opposite state or condition
63 swap (verb) : to give something to someone and receive something in return : to trade or exchange (things)
67 : to turn (something) over by throwing it up in the air with a quick movement
69 : to cause (something) to turn or turn over quickly
71 : to move (something) with a quick light movement
73 --------------------------------------------------
75 Copyright Beman Dawes, 2014
76 Distributed under the Boost Software License, Version 1.0.
77 See www.boost.org/LICENSE_1_0.txt