[Filesystem] error including filesystem v3 with icpc -std=c++0x

Hello, Including boost/filesystem.hpp is giving me errors using Intel compiler in Linux with -std=c++0x that look like boost/filesystem/v3/operations.hpp(303): error: name followed by "::" must be a class or namespace name {detail::copy_file(from, to, copy_option::fail_if_exists);} ^ It compiles fine under g++ -std=c++0x. There are also a plethora of warnings like boost/filesystem/v3/operations.hpp(626): warning #279: controlling expression is constant BOOST_ASSERT(m_imp.get() && "attempt to dereference end iterator"); ^ I'd appreciate any help/ideas. Thanks, Galen

On Mon, Apr 18, 2011 at 8:13 PM, Galen Andrew <pupochik@gmail.com> wrote:
Hello,
Including boost/filesystem.hpp is giving me errors using Intel compiler in Linux with -std=c++0x that look like
boost/filesystem/v3/operations.hpp(303): error: name followed by "::" must be a class or namespace name {detail::copy_file(from, to, copy_option::fail_if_exists);} ^ It compiles fine under g++ icpc.
What happens with the Intel compiler if you don't specify -std=c++0x? The regression tests are passing for Intel on Linux, but it doesn't look like any of them specify -std=c++0x What version of the Intel compiler are you using? What version of Boost are you using?
There are also a plethora of warnings like
boost/filesystem/v3/operations.hpp(626): warning #279: controlling expression is constant BOOST_ASSERT(m_imp.get() && "attempt to dereference end iterator"); ^
That one of the problems of the && assert idiom. Now that we've got BOOST_ASSERT_MSG, it can be used to quiet those warnings. I'll take care of that. --Beman
participants (2)
-
Beman Dawes
-
Galen Andrew