Bug#61081: Ambiguious C++ constructs causes c++ compiler to choke on apt compile
Package: apt
Version: 0.3.16
Severity: normal
In several instances, apt has definitions where a variable name is the same
as a type definition (usually an enum). For example, in orderlist.h, there's
a variable Flags and an enum Flags. This causes some of the newer g++
compilers to choke. No quite sure what the c++ specs say on this, but it'll
probably be best to not to code things like that :)
In file included from packagemanager.cc:20:
/home/randolph/debian/apt/apt-0.3.18/include/apt-pkg/orderlist.h: In method
bool pkgOrderList::IsFlag (pkgCache::PkgIterator, long unsigned int)':
/home/randolph/debian/apt/apt-0.3.18/include/apt-pkg/orderlist.h:99: invalid
use of type decl enum pkgOrderList::Flags' as expression
/home/randolph/debian/apt/apt-0.3.18/include/apt-pkg/orderlist.h:99: invalid
types pkgOrderList::Flags[short unsigned int]' for array subscript
(... etc ...)
randolph
-- System Information
Debian Release: 2.2
Architecture: i386
Kernel: Linux gandalf 2.2.14 #1 Sun Feb 27 14:09:39 MST 2000 i686
Versions of packages apt depends on:
ii libc6 2.1.3-7 GNU C Library: Shared libraries an
ii libstdc++2.10 1:2.95.2-7 The GNU stdc++ library
Reply to: