tribool namespace problem with vc-7_1

Hello, is the following code correct? #include <boost/logic/tribool.hpp> using namespace boost; using namespace boost::logic; int main() { tribool tb; tribool &rtb = tb; rtb = indeterminate; } My Visual C++ Compiler 7.1 says "INTERNAL COMPILER ERROR". If i comment out "using namespace boost;" everything works fine... -- Sebastian Pfützner s.pfuetzner@onlinehome.de ICQ-ID: 39965036

On 4/14/05, Sebastian Pfützner <s.pfuetzner@onlinehome.de> wrote:
Hello, is the following code correct?
#include <boost/logic/tribool.hpp>
using namespace boost; using namespace boost::logic;
int main() { tribool tb; tribool &rtb = tb;
rtb = indeterminate; }
My Visual C++ Compiler 7.1 says "INTERNAL COMPILER ERROR". If i comment out "using namespace boost;" everything works fine...
-- Sebastian Pfützner s.pfuetzner@onlinehome.de ICQ-ID: 39965036
Might be because in tribool.hpp, there's this code namespace boost { using logic::tribool; using logic::indeterminate; } I've seen VC7.1 struggle with namespace issues like this. However, this means you don't need the using boost::logic, so there's a workaround :-) Stuart Dootson

On Apr 14, 2005, at 2:34 PM, Sebastian Pfützner wrote:
Hello, is the following code correct?
Yes.
#include <boost/logic/tribool.hpp>
using namespace boost; using namespace boost::logic;
int main() { tribool tb; tribool &rtb = tb;
rtb = indeterminate; }
My Visual C++ Compiler 7.1 says "INTERNAL COMPILER ERROR". If i comment out "using namespace boost;" everything works fine...
What if you comment out "using namespace boost::logic" ? tribool and interminate are imported into namespace boost via a using declaration, which is probably the cause of the internal compiler error. Doug
participants (3)
-
Doug Gregor
-
Sebastian Pfützner
-
Stuart Dootson