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: pbristow
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 johnmaddock

  • Owner changed from johnmaddock to pbristow

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 johnmaddock

(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 pbristow

  • Resolution set to fixed
  • Status changed from new to closed

comment:6 Changed 6 years ago by pbristow

  • Keywords stde:: qualifier added
  • Milestone changed from To Be Determined to Boost 1.49.0
  • Severity changed from Showstopper to Problem

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain pbristow.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.