Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000400 [ALGLIB] AlgoPascal minor have not tried 2011-06-24 10:39 2018-01-03 08:47
Reporter armin View Status public  
Assigned To SergeyB
Priority normal Resolution open  
Status assigned   Product Version 3.3.0
Summary 0000400: Compiler warning in ap.h
Description Using gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5), I get the following warning:

ap.h:719: warning: type qualifiers ignored on function return type
ap.h:720: warning: type qualifiers ignored on function return type

These are the two lines:
const bool operator==(const alglib::complex& lhs, const alglib::complex& rhs);
const bool operator!=(const alglib::complex& lhs, const alglib::complex& rhs);

I guess the const flag can be savely removed for bool return values.
Additional Information
Programming language C++
Attached Files

- Relationships

-  Notes
zaytsev (reporter)
2018-01-03 08:47

It doesn't have anything to do with booleans per se, but rather with non-class (POD) rvalues:

But yes, the bottom line is that the const qualifier can be safely removed in this situation.

- Issue History
Date Modified Username Field Change
2011-06-24 10:39 armin New Issue
2011-06-24 10:39 armin Programming language => C++
2018-01-02 17:23 SergeyB Status new => assigned
2018-01-02 17:23 SergeyB Assigned To => SergeyB
2018-01-03 08:47 zaytsev Note Added: 0000070

Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker