Bug 477131 - boost/function.hpp and -fno-exceptions craps out
Summary: boost/function.hpp and -fno-exceptions craps out
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: boost
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Benjamin Kosnik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-12-19 10:29 UTC by Caolan McNamara
Modified: 2013-08-09 05:48 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-12-19 15:11:18 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
trivial test-case (61 bytes, text/plain)
2008-12-19 10:29 UTC, Caolan McNamara
no flags Details
Heres a fix to the header (545 bytes, patch)
2008-12-19 10:35 UTC, Caolan McNamara
no flags Details | Diff

Description Caolan McNamara 2008-12-19 10:29:54 UTC
Created attachment 327426 [details]
trivial test-case

On F-10

g++ test.cxx
g++ -fno-exceptions test.cxx

works fine

on rawhide now

g++ test.cxx
works, but
g++ -fno-exceptions test.cxx
will crap out with 

In file included from /usr/include/boost/function/detail/maybe_include.hpp:13,
                 from /usr/include/boost/function/detail/function_iterate.hpp:14,
                 from /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp:47,
                 from /usr/include/boost/function.hpp:64,
                 from test.cxx:1:
/usr/include/boost/function/function_template.hpp:965: error: declaration of ‘class R’
/usr/include/boost/function/function_template.hpp:652: error:  shadows template parm ‘class R’
/usr/include/boost/function/function_template.hpp:979: error: declaration of ‘class R’
/usr/include/boost/function/function_template.hpp:652: error:  shadows template parm ‘class R’
/usr/include/boost/function/function_template.hpp:983: error: invalid use of incomplete type ‘class boost::function0<R>’
/usr/include/boost/function/function_template.hpp:667: error: declaration of ‘class boost::function0<R>’
/usr/include/boost/function/function_template.hpp:994: error: declaration of ‘class R’
/usr/include/boost/function/function_template.hpp:652: error:  shadows template parm ‘class R’
/usr/include/boost/function/function_template.hpp:1000: error: ‘void boost::function0<R>::operator==(const boost::function0<R>&, const boost::function0<R>&)’ must take exactly one argument
/usr/include/boost/function/function_template.hpp:1001: error: declaration of ‘class R’
/usr/include/boost/function/function_template.hpp:652: error:  shadows template parm ‘class R’
/usr/include/boost/function/function_template.hpp:1007: error: ‘void boost::function0<R>::operator!=(const boost::function0<R>&, const boost::function0<R>&)’ must take exactly one argument
/usr/include/boost/function/function_template.hpp:1017: error: declaration of ‘class R’
/usr/include/boost/function/function_template.hpp:652: error:  shadows template parm ‘class R’
/usr/include/boost/function/function_template.hpp:1025: error: ‘struct boost::function<R ()()>::clear_type’ redeclared with different access
/usr/include/boost/function/function_template.hpp:1098: error: ‘class boost::function<R ()()>’ redeclared with different access
In file included from /usr/include/boost/function/detail/maybe_include.hpp:18,
                 from /usr/include/boost/function/detail/function_iterate.hpp:14,
                 from /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp:52,
                 from /usr/include/boost/function.hpp:64,
                 from test.cxx:1:
/usr/include/boost/function/function_template.hpp:80: error: expected unqualified-id before ‘namespace’
test.cxx:6: error: expected `}' at end of input

Comment 1 Caolan McNamara 2008-12-19 10:35:55 UTC
Created attachment 327427 [details]
Heres a fix to the header

Here's a fix to the broken header. Just looks like a bad placement of the ifdef

Comment 2 Petr Machata 2008-12-19 15:11:18 UTC
Fixed in rawhide.  Thanks for the patch.


Note You need to log in before you can comment on or make changes to this bug.