|
Boost Users : |
From: Elmar Bihler (yg-boost-users_at_[hidden])
Date: 2003-05-07 01:47:48
Yes, I have the same problem with Boost1.30.0/Borland C++ Builder 5.
To be more precise, when I try to compile the following:
//----------------------------------------------
#include<boost/tuple/tuple.hpp>
int main(int argc, char* argv[])
{
return 0;
}
//----------------------------------------------
, I get these errors:
[C++ Fehler] tuple_basic.hpp(158): E2434 In Template-Deklaration fehlen
Template-Parameter ('template<...>')
[C++ Fehler] tuple_basic.hpp(158): E2238 Bezeichner 'element<N,T>' mehrfach
deklariert
[C++ Fehler] tuple_basic.hpp(143): E2344 'element<N,T>' bereits deklariert
(in english, they should read something like:
E2434 Template declaration missing template parameters ('template<...>')
E2238 Multiple declaration of 'element<N,T>'
E2344 'element<N,T>' already declared
)
As a very crude way to fix the problem, I commented out the
const-specializations
of the element template in tuple.hpp:
//template<int N, class T>
//struct element<N, const T>
//{
//private:
// typedef typename T::tail_type Next;
// typedef typename element<N-1, Next>::type unqualified_type;
//public:
// typedef typename boost::add_const<unqualified_type>::type type;
//};
//template<class T>
//struct element<0,const T>
//{
// typedef typename boost::add_const<typename T::head_type>::type type;
//};
Now I can at least compile code using tuples. (e.g. the knights-tour example
from boost).
Does anyone have a more elegant workaround?
Is this a bug that I should submit or is it already known?
Does anyone know if reverting to an older version of boost will solve the
problem?
Questions, questions... :-)
CU,
Elmar Bihler.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net