Source: laserboy
Version: 2016.03.15-1
Severity: normal
Tags: patch
Hi Maintainer
Laserboy FTBFS with Boost 1.60 with the following, and similar, errors:
/«PKGBUILDDIR»/src/LaserBoy_common.hpp:111:24: error: reference to
'ifstream' is ambiguous
bool get_dxf_pair (ifstream& in, int& group_code, string&
entity_string);
^
In file included from /usr/include/boost/filesystem/string_file.hpp:14:0,
from /usr/include/boost/filesystem.hpp:19,
from /«PKGBUILDDIR»/src/LaserBoy_includes.hpp:58,
from /«PKGBUILDDIR»/src/LaserBoy_macros.hpp:34,
from /«PKGBUILDDIR»/src/LaserBoy_common.hpp:34,
from /«PKGBUILDDIR»/src/LaserBoy_bmp.hpp:33,
from /«PKGBUILDDIR»/src/LaserBoy_segment.hpp:34,
from /«PKGBUILDDIR»/src/LaserBoy_frame.hpp:34,
from /«PKGBUILDDIR»/src/LaserBoy_frame_set.hpp:34,
from /«PKGBUILDDIR»/src/LaserBoy_space.hpp:34,
from /«PKGBUILDDIR»/src/LaserBoy_TUI.hpp:33,
from /«PKGBUILDDIR»/src/LaserBoy_GUI_base.hpp:33,
from /«PKGBUILDDIR»/src/LaserBoy_SDL_GUI.hpp:34,
from /«PKGBUILDDIR»/src/LaserBoy.cpp:30:
/usr/include/boost/filesystem/fstream.hpp:169:32: note: candidates are:
typedef class boost::filesystem::basic_ifstream<char>
boost::filesystem::ifstream
typedef basic_ifstream<char> ifstream;
^
Boost 1.60 is not the default in Debian yet, but it is for Ubuntu 16.10.
Please find a patch tested in Ubuntu 16.10 attached.
Regards
Graham
Description: Fix ambiguous {i|o}fstream with Boost 1.60
This fixes a FTBFS with the following, and similar, errors:
src/LaserBoy_common.hpp:111:24: error: reference to 'ifstream' is ambiguous
bool get_dxf_pair (ifstream& in, int& group_code, string& entity_string);
note: candidates are: typedef class boost::filesystem::basic_ifstream<char>
boost::filesystem::ifstream
.
An alternative fix is to replace every occurrence of ifstream
with std::ifstream, and similarly ofstream and fstream.
Author: Graham Inggs <gin...@debian.org>
Last-Update: 2016-05-23
--- a/src/LaserBoy_includes.hpp
+++ b/src/LaserBoy_includes.hpp
@@ -56,7 +56,19 @@
#include <cctype>
#include <locale>
-using namespace std;
+using std::dec;
+using std::endl;
+using std::hex;
+using std::ios;
+using std::left;
+using std::noshowpos;
+using std::ostringstream;
+using std::string;
+using std::stringstream;
+using std::setfill;
+using std::setw;
+using std::showpos;
+using std::vector;
//boost
#include <boost/filesystem.hpp>