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

[ Thread Index | Date Index | More 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 Capricelli <orzel@xxxxxxxxxxxxxxx>

Mail converted by MHonArc 2.6.19+