Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#5914 closed Bugs (fixed)

std:: qualifier missing for <cstring> function

Reported by: stephen.clamage@… Owned by: Paul A. Bristow
Milestone: Boost 1.49.0 Component: math
Version: Boost 1.47.0 Severity: Problem
Keywords: stde:: qualifier Cc:

Description

In the math library, file boost/math/special_functions/nonfinite_num_facets.hpp includes <cstring>, but at line 144 refers to strlen without a std:: qualifier. Although g++ accepts the code, it does not conform to the requirements of the C++ standard (1998, 2003, 2011). Change needed:


144c144 < int width = (int)strlen(prefix) + (int)strlen(body); ---

int width = (int)std::strlen(prefix) + (int)std::strlen(body);

g++ accepts the correct code, so there should be no compatibility issue.

Change History (6)

comment:1 by anonymous, 11 years ago

I see my diffs got clobbered. I'll try again:

------- nonfinite_num_facets.hpp -------
144c144
<         int width = (int)strlen(prefix) + (int)strlen(body);
---
>         int width = (int)std::strlen(prefix) + (int)std::strlen(body);

comment:2 by John Maddock, 11 years ago

Owner: changed from John Maddock to Paul A. Bristow

comment:3 by anonymous, 11 years ago

Sending content: I:\boost-trunk\boost\math\special_functions\nonfinite_num_facets.hpp Completed: At revision: 74480

as suggested for standard compliance.

Paul Bristow

comment:4 by John Maddock, 11 years ago

(In [74984]) Merge recent bug fixes from Trunk. Refs #6014 Refs #5832 Refs #5934 Refs #6001 Refs #5982 Refs #5914 Refs #5927

comment:5 by Paul A. Bristow, 11 years ago

Resolution: fixed
Status: newclosed

comment:6 by Paul A. Bristow, 11 years ago

Keywords: stde:: qualifier added
Milestone: To Be DeterminedBoost 1.49.0
Severity: ShowstopperProblem
Note: See TracTickets for help on using tickets.