1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
//! A simple power-of-two macro. Useful for creating compile-time constants.

use proc_macro_hack::proc_macro_hack;

/// Raises 2 to the power of provided `exp`.
///
/// ```
/// use power_of_two::power_of_two;
///
/// const POW_2: usize = power_of_two!(2);
/// const POW_2_isize: isize = power_of_two!(2, isize);
/// ```
#[proc_macro_hack]
pub use power_of_two_impl::power_of_two;