Opened 8 years ago

Closed 8 years ago

#10840 closed Bugs (fixed)

Missing std:: qualifier for puts call in test_7868.cpp

Reported by: Aparna Kumta <Aparna.Kumta@…> Owned by: viboes
Milestone: Boost 1.58.0 Component: chrono
Version: Boost Development Trunk Severity: Problem
Keywords: Cc:

Description

File libs/chrono/test/test_7868.cpp fails when compiled with Oracle Solaris Studio 12.4 on Solaris 11.2 as follows:

"../libs/chrono/test/test_7868.cpp", line 32: Error: The function "puts" must have a prototype. "../libs/chrono/test/test_7868.cpp", line 32: Error: The function "puts" must have a prototype.

The file test_7868.cpp includes <cstdio>, however the call to puts needs to be qualified with std::.

The diff's for the file are

32c32

< puts(ctime(&t));

---

std::puts(ctime(&t));

Per the C++ standard, including a <cxxxx> header like <cstdio> in this case, the names in these headers are only in the namespace std. Hence they need to be qualified with std::.

Change History (2)

comment:2 by viboes, 8 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.