diff options
-rw-r--r-- | Eigen/src/Core/Coeffs.h | 6 | ||||
-rw-r--r-- | Eigen/src/Core/Util.h | 8 |
2 files changed, 9 insertions, 5 deletions
diff --git a/Eigen/src/Core/Coeffs.h b/Eigen/src/Core/Coeffs.h index b170ffda7..8e298de7d 100644 --- a/Eigen/src/Core/Coeffs.h +++ b/Eigen/src/Core/Coeffs.h @@ -5,12 +5,12 @@ // // Eigen is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either +// License as published by the Free Software Foundation; either // version 3 of the License, or (at your option) any later version. // // Alternatively, you can redistribute it and/or // modify it under the terms of the GNU General Public License as -// published by the Free Software Foundation; either version 2 of +// published by the Free Software Foundation; either version 2 of // the License, or (at your option) any later version. // // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY @@ -18,7 +18,7 @@ // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the // GNU General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public +// You should have received a copy of the GNU Lesser General Public // License and a copy of the GNU General Public License along with // Eigen. If not, see <http://www.gnu.org/licenses/>. diff --git a/Eigen/src/Core/Util.h b/Eigen/src/Core/Util.h index d82ec574f..6166394ee 100644 --- a/Eigen/src/Core/Util.h +++ b/Eigen/src/Core/Util.h @@ -217,7 +217,9 @@ struct ei_result_of<Func(ArgType)> { static ei_has_tr1_result testFunctor(T const *, typename T::template result<T(ArgType)>::type const * = 0); static ei_has_none testFunctor(...); - typedef typename ei_unary_result_of_select<Func, ArgType, sizeof(testFunctor(static_cast<Func*>(0)))>::type type; + // note that the following indirection is needed for gcc-3.3 + enum {FunctorType = sizeof(testFunctor(static_cast<Func*>(0)))}; + typedef typename ei_unary_result_of_select<Func, ArgType, FunctorType>::type type; }; template<typename Func, typename ArgType0, typename ArgType1, int SizeOf=sizeof(ei_has_none)> @@ -239,7 +241,9 @@ struct ei_result_of<Func(ArgType0,ArgType1)> { static ei_has_tr1_result testFunctor(T const *, typename T::template result<T(ArgType0,ArgType1)>::type const * = 0); static ei_has_none testFunctor(...); - typedef typename ei_binary_result_of_select<Func, ArgType0, ArgType1, sizeof(testFunctor(static_cast<Func*>(0)))>::type type; + // note that the following indirection is needed for gcc-3.3 + enum {FunctorType = sizeof(testFunctor(static_cast<Func*>(0)))}; + typedef typename ei_binary_result_of_select<Func, ArgType0, ArgType1, FunctorType>::type type; }; #endif // EIGEN_UTIL_H |