[Boost-bugs] [Boost C++ Libraries] #10840: Missing std:: qualifier for puts call in test_7868.cpp

Subject: [Boost-bugs] [Boost C++ Libraries] #10840: Missing std:: qualifier for puts call in test_7868.cpp
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-12-02 20:05:22


#10840: Missing std:: qualifier for puts call in test_7868.cpp
-------------------------------------------+---------------------
 Reporter: Aparna Kumta <Aparna.Kumta@…> | Owner: viboes
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: chrono
  Version: Boost Development Trunk | Severity: Problem
 Keywords: |
-------------------------------------------+---------------------
 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::.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/10840>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:17 UTC