hi henrik, this was just reported to me in the debian BTS... aparently there are namespace problems with fbpager / g++ 4.1 which prevent it from compiling. one of the bug reporters was kind enough to provide a patch, which is included below in the forwarded message.
when g++ 4.1 becomes the default in debian, the severity of this
bug will be raised. sometime between now and then i will probably
include this patch as part of the debian diff if there won't
be a forthcoming version of fbpager in the meantime (please let
me know if there is though).
regards,
sean
----- Forwarded message from Ben Hutchings <[EMAIL PROTECTED]> -----
Subject: Bug#357774: FTBFS with G++ 4.1: namespace problems
From: Ben Hutchings <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED], [EMAIL PROTECTED]
Date: Sun, 19 Mar 2006 14:50:17 +0000
tags 357774 +patch
thanks
See <http://womble.decadentplace.org.uk/c++/template-faq.html#specialise-ns>
for an explanation of the error message.
Here's a patch:
diff -ur fbpager-0.1.4.orig/src/Resources.hh fbpager-0.1.4/src/Resources.hh
--- fbpager-0.1.4.orig/src/Resources.hh 2004-03-02 16:49:51.000000000 +0000
+++ fbpager-0.1.4/src/Resources.hh 2006-03-19 14:40:58.000000000 +0000
@@ -8,8 +8,10 @@
#include <cstdio>
#include <cstring>
+namespace FbTk {
+
template<>
-void FbTk::Resource<bool>::
+void Resource<bool>::
setFromString(char const *strval) {
if (strcasecmp(strval, "true") == 0 ||
strcasecmp(strval, "yes") == 0)
@@ -19,38 +21,37 @@
}
template<>
-std::string FbTk::Resource<bool>::
+std::string Resource<bool>::
getString() {
return std::string(**this == true ? "true" : "false");
}
template <>
-void FbTk::Resource<std::string>::setFromString(const char *str) {
+void Resource<std::string>::setFromString(const char *str) {
*(*this) = (str ? str : "");
}
template <>
-std::string FbTk::Resource<std::string>::getString() {
+std::string Resource<std::string>::getString() {
return *(*this);
}
template <>
-void FbTk::Resource<int>::setFromString(const char *str) {
+void Resource<int>::setFromString(const char *str) {
if (str == 0)
return;
sscanf(str, "%d", &(*(*this)));
}
template <>
-std::string FbTk::Resource<int>::getString() {
+std::string Resource<int>::getString() {
char buff[16];
sprintf(buff, "%d", (*(*this)));
return std::string(buff);
}
-namespace FbPager {
template <>
-void FbTk::Resource<FbPager::Alignment>::setFromString(const char *str) {
+void Resource<FbPager::FbPager::Alignment>::setFromString(const char *str) {
if (strcmp("TopToBottom", str) == 0)
*(*this) = FbPager::FbPager::TOP_TO_BOTTOM;
else
@@ -58,7 +59,7 @@
}
template <>
-std::string FbTk::Resource<FbPager::Alignment>::getString() {
+std::string Resource<FbPager::FbPager::Alignment>::getString() {
switch (*(*this)) {
case FbPager::FbPager::LEFT_TO_RIGHT:
return "LeftToRight";
@@ -67,6 +68,6 @@
}
}
-} // end namespace FbPager
+} // end namespace FbTk
#endif // RESOURCES
-- END --
--
Ben Hutchings
The world is coming to an end. Please log off.
----- End forwarded message -----
--
signature.asc
Description: Digital signature

