[#ConvertBits] = ConvertBits :mrdocs: Convert from one power‐of‐2 number base to another. == Synopsis Declared in `<util/strencodings.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< int frombits, int tobits, bool pad, typename O, typename It, typename I = std::identity> bool ConvertBits( O outfn, It it, It end, I infn = {}); ---- == Return Value true on success, false if an input value is invalid or leftover bits cannot be padded. == Parameters [cols="1,4"] |=== | Name| Description | *outfn* | Callback invoked with each produced output value. | *it* | Iterator to the first input value. | *end* | Iterator past the last input value. | *infn* | Callback mapping each input element to a non‐negative integer value. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#