Static declarations are not considered for a function call if the function is not qualified

StackOverflow https://stackoverflow.com/questions/1094066

  •  11-09-2019
  •  | 
  •  

Question

"painting/qpathclipper.cpp", line 1643.30: 1540-0274 (S) The name lookup for "fuzzyCompare" did not find a declaration.

"painting/qpathclipper.cpp", line 1643.30: 1540-1292 (I) Static declarations are not considered for a function call if the function is not qualified.

I'm trying to compile Qt 4.5.0 on xlC 9.0.0.4a, and getting the above compiler message for the following code:

static bool fuzzyCompare(qreal a, qreal b)
{
    return qFuzzyCompare(a, b);
}

template <typename InputIterator>
InputIterator qFuzzyFind(InputIterator first, InputIterator last, qreal val)
{
    while (first != last && !fuzzyCompare(qreal(*first), qreal(val))) //line 1643
        ++first;
    return first;
}
Was it helpful?

Solution

The "static" keyword is in error here, fuzzyCompare should be declared just

bool fuzzyCompare(qreal a, qreal b)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top