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

6 views
Skip to first unread message

Galen Andrew

unread,
Apr 18, 2011, 8:13:57 PM4/18/11
to bo...@lists.boost.org
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
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Beman Dawes

unread,
Apr 18, 2011, 10:01:27 PM4/18/11
to boost
On Mon, Apr 18, 2011 at 8:13 PM, Galen Andrew <pupo...@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

Galen Andrew

unread,
Apr 19, 2011, 12:55:52 PM4/19/11
to boost
> > 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.

>
> What happens with the Intel compiler if you don't specify -std=c++0x?

Without -std=c++0x those errors are gone, but a similar error pops up
in another boost library I'm using

boost/random/variate_generator.hpp(209): error: name followed by "::"


must be a class or namespace name

typedef typename random::detail::engine_helper<have_int,
want_int>::BOOST_NESTED_TEMPLATE impl<decorated_engine, typename
Distribution::input_type>::type internal_engine_type;

^

> 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?

Version 12.0.2.137 Build 20110112

>
> What version of Boost are you using?

1.46.1

Thanks!

Reply all
Reply to author
Forward
0 new messages