Issue building program using Xcode

Joined
Jul 10, 2012
Messages
3
Reaction score
0
Points
1
I'm trying to build a demo program, but the code for it is not properly compiling. Specifically, when I try to build it, it has a problem with the sort function, saying "Call to function 'sqrt' that is neither visible in the template definition nor found by argument-dependent lookup". What's also odd is there is one other instance of the sqrt function that is not causing an issue.

Here is the code that's causing an issue:

template <class T, unsigned int C>
T length(const vector_fixed<T,C> & a) {
return (T) sqrt(length2(a));
}

And here is the code that also includes sqrt but does not cause an issue:
T two_norm() const {
return sqrt(dot_product(*this));
}

Any help would be greatly appreciated. Thanks!
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top