[#BloombergLP-bdlb-BitUtil-roundUpToBinaryPower-08]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::xref:BloombergLP/bdlb/BitUtil.adoc[BitUtil]::roundUpToBinaryPower
:relfileprefix: ../../../
:mrdocs:

Return the least power of 2 not less than `value`&period;

== Synopsis

Declared in `&lt;bdlb&lowbar;bitutil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
unsigned int
roundUpToBinaryPower(unsigned int value);
----

== Description

Return the least power of 2 that is greater than or equal to the specified `value`, and 0 if the conversion was not successful&period; Note that the conversion will succeed if and only if `0 &lt; value &lt;&equals; (1 &lt;&lt; (sizeInBits(value) &hyphen; 1))`

== Return Value

least power of 2 not less than `value`, or 0 on failure

== Parameters

[cols="1,4"]
|===
| Name| Description
| *value*
| value to round up to a power of 2
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
