00001 // Software License for MTL 00002 // 00003 // Copyright (c) 2007 The Trustees of Indiana University. 00004 // 2008 Dresden University of Technology and the Trustees of Indiana University. 00005 // All rights reserved. 00006 // Authors: Peter Gottschling and Andrew Lumsdaine 00007 // 00008 // This file is part of the Matrix Template Library 00009 // 00010 // See also license.mtl.txt in the distribution. 00011 00012 #ifndef META_MATH_POWER_OF_2_INCLUDE 00013 #define META_MATH_POWER_OF_2_INCLUDE 00014 00015 namespace meta_math { 00016 00017 00018 // Computes the n-th power of 2 00019 // So simple, everybody could do it, it is only there for the sake of completeness 00020 template <unsigned long N> 00021 struct power_of_2 00022 { 00023 static const unsigned long value= X << N; 00024 }; 00025 00026 } // namespace meta_math 00027 00028 #endif // META_MATH_POWER_OF_2_INCLUDE