584. missing int pow(int,int) functionality

Section: 29.9 [c.math] Status: NAD Submitter: Beman Dawes Opened: 2006-06-15 Last modified: 2016-02-10

Priority: Not Prioritized

View all other issues in [c.math].

View all issues with NAD status.

Discussion:

There is no pow() function for any integral type.

Proposed resolution:

Add something like:

template< typename T>
T power( T x, int n );
// requires: n >=0

Rationale:

Toronto: We already have double pow(integral, integral) from 29.9 [c.math] p11.