is_power_of_2.hpp
来自「矩阵运算源码最新版本」· HPP 代码 · 共 26 行
HPP
26 行
// Software License for MTL// // Copyright (c) 2007 The Trustees of Indiana University. All rights reserved.// Authors: Peter Gottschling and Andrew Lumsdaine// // This file is part of the Matrix Template Library// // See also license.mtl.txt in the distribution.#ifndef META_MATH_IS_POWER_OF_2_INCLUDE#define META_MATH_IS_POWER_OF_2_INCLUDE#include <boost/numeric/meta_math/least_significant_one_bit.hpp>namespace meta_math {template <unsigned long X>struct is_power_of_2{ static const bool value= X == least_significant_one_bit<X>::value;};} // namespace meta_math#endif // META_MATH_IS_POWER_OF_2_INCLUDE
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?