Boost logo

Boost Users :

Subject: Re: [Boost-users] 'class' : missing tag name - compilation errors in two boost headers (shared_ptr and is_function_ptr_tester.hpp) in my project
From: Peter Dimov (pdimov_at_[hidden])
Date: 2009-10-26 17:32:44


BKnoth wrote:
> I'm stuck on basic compilation issues in boost files that get included
> in my source code. The errors turn up in boost headers.
>
> Any help is appreciated! Thanks.
>
> I'm using Boost 1.40.0
> MSVC Version 2008 - V 9.0.30729.1 SP
>
>
> In both shared_ptr.hpp and is_function_ptr_tester.hpp I get the same
> compilation error:
>
> MSVC error: error C2332: 'class' : missing tag name
>
>
> Here are the specific lines from the two files (I inserted a "Error
> Here!!! comment on the offending lines):
>
> ----------------
> in shared_ptr.hpp (line 146):
>
> #if !defined( BOOST_NO_SFINAE ) && !defined(
> BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) && !defined(
> BOOST_NO_AUTO_PTR )
>
> // rvalue auto_ptr support based on a technique by Dave Abrahams
>
> template< class T, class R > struct sp_enable_if_auto_ptr // Error
> Here!!! {
> };
>
> ----------------
> in is_function_ptr_tester.hpp (line 37):
>
> #if !defined(BOOST_TT_PREPROCESSING_MODE)
> // pre-processed code, don't edit, try GNU cpp with
> // cpp -I../../../ -DBOOST_TT_PREPROCESSING_MODE -x c++ -P filename
>
> template <class R > // Error Here!!!
> yes_type is_function_ptr_tester(R (*)());

You have a macro called 'R'.


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