error: namespace ‘boost::filesystem’ not allowed in using-declaration

Project:Programming
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Related pages:#126: error: namespace ‘foo::bar’ not allowed in using-declaration
Description

learning from:
http://www.boost.org/doc/libs/1_43_0/libs/filesystem/doc/index.htm

#include "boost/filesystem.hpp"   // includes all needed Boost.Filesystem declarations
#include <iostream>               // for std::cout
using boost::filesystem;          // for ease of tutorial presentation;
                                  //  a namespace alias is preferred practice in real code

compiling gives me this error:

boost_example.cpp:3: error: namespace ‘boost::filesystem’ not allowed in using-declaration

Comments

#1

This guy made the exact same mistake for the exact same reasons:
http://www.siteduzero.com/forum-83-435020-p1-using-file-system.html
!!

#2

Status:active» fixed
Related pages:-124: Compiler Errors+126: error: namespace ‘foo::bar’ not allowed in using-declaration

#3

#4

Status:fixed» closed
Related pages:-126: error: namespace ‘foo::bar’ not allowed in using-declaration

Automatically closed -- issue fixed for 2 weeks with no activity.