Modify

Ticket #5914 (closed Bugs: fixed)

Opened 3 years ago

Last modified 2 years ago

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

Change History

comment:1 Changed 3 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 3 years ago by johnmaddock

  • Owner changed from johnmaddock to pbristow

comment:3 Changed 3 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 3 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 2 years ago by pbristow

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

comment:6 Changed 2 years ago by pbristow

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

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
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.