Modify

Opened 6 years ago

Closed 6 years ago

Last modified 6 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.

Attachments (0)

Change History (6)

comment:1 Changed 6 years ago by anonymous

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 Changed 6 years ago by John Maddock

Owner: changed from John Maddock to Paul A. Bristow

comment:3 Changed 6 years ago by anonymous

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 Changed 6 years ago by John Maddock

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

comment:5 Changed 6 years ago by Paul A. Bristow

Resolution: fixed
Status: newclosed

comment:6 Changed 6 years ago by Paul A. Bristow

Keywords: stde:: qualifier added
Milestone: To Be DeterminedBoost 1.49.0
Severity: ShowstopperProblem

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Paul A. Bristow.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.