Re: [eigen] Re: [Bitbucket] Pull request #80: Allow LevenbergMarquardt to work with non-standard types. (eigen/eigen)

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]




Il 28/08/2014 22:31, Jitse Niesen ha scritto:
Sorry, I should probably have waited for your feedback instead of
jumping the gun and merging it.

No, it's ok, you did well.


static Scalar sqrt_(const Scalar& x) { using std::sqrt; return sqrt(x); }

If Scalar is a custom type like mpreal which is defined in its own
namespace, then this function also looks for sqrt in that namespace (I
think it's called argument-dependent lookup). For standard types there
is no difference.

You mean that

	{ using std::sqrt; return sqrt(x); }

will use std::sqrt() only when sqrt(someothertype) is not previously defined ?

Thomas
--
Thomas Capricelli <orzel@xxxxxxxxxxxxxxx>
http://www.freehackers.org/thomas/



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/