bug #1247: fix regression in compilation of pow(integer,integer), and add respective unit tests.

This commit is contained in:
Gael Guennebaud
2016-06-25 10:12:06 +02:00
parent cfff370549
commit d476cadbb8
2 changed files with 18 additions and 17 deletions

View File

@@ -510,7 +510,7 @@ template<typename ScalarX,typename ScalarY>
struct pow_impl<ScalarX,ScalarY, true>
{
typedef ScalarX result_type;
static EIGEN_DEVICE_FUNC inline ScalarX run(const ScalarX &x, const ScalarY &y)
static EIGEN_DEVICE_FUNC inline ScalarX run(ScalarX x, ScalarY y)
{
ScalarX res(1);
eigen_assert(!NumTraits<ScalarY>::IsSigned || y >= 0);