Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of boost. Click here for the latest Boost documentation.
PrevUpHomeNext

Function template power

boost::algorithm::power

Synopsis

// In header: <boost/algorithm/algorithm.hpp>


template<typename T, typename Integer, typename Operation> 
  BOOST_CXX14_CONSTEXPR boost::enable_if< boost::is_integral< Integer >, T >::type 
  power(T x, Integer n, Operation op);

Description

Parameters:

n

The exponent (must be >= 0)

op

The operation used

x

The value to be exponentiated

Returns:

the value "x" raised to the power "n" using the operation "op".


PrevUpHomeNext