Re: [Boost-bugs] [Boost C++ Libraries] #5010: Fusion will now compile under Objective-C++

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #5010: Fusion will now compile under Objective-C++
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-05-28 18:56:42


#5010: Fusion will now compile under Objective-C++
---------------------------------------------+------------------------------
  Reporter: Brian Doig <Brian.Doig@…> | Owner: djowel
      Type: Bugs | Status: reopened
 Milestone: To Be Determined | Component: fusion
   Version: Boost 1.45.0 | Severity: Showstopper
Resolution: | Keywords:
---------------------------------------------+------------------------------

Comment (by Brian.Doig@…):

 Replying to [comment:25 mjcaisse]:
> Replying to [comment:22 Mital]:
> > I have checked out the latest code .. but I am not able to compile the
 trunk at revision 84441
> >
> > ... falied darwin.compile.c++
 bin.v2/lib/log/build/darwin-4.2.1/release/build-no/link-static/log-api-
 unix/threading-multi/filter_parser.o
> >
> >
> > It may not be related to the fixes u commited but I am not sure how
 can I verify the changes commited.
>
>
> Hi Mital -
>
> This ticket refers to fusion... you are having build issues with
 something in log it would seem. If you would like to verify the fusion
 changes you can build the Fusion test or something that uses Fusion (which
 is a header-only library). The problem reported (and in theory fixed)
 relates to ObjC's bad behaviour of making things like nil and Nil special
 (via keyword or macro... I do not know).
>
> Changing template parameters name Nil to Nil_ would not have broken log
 (o;

 ObjC's so called bad behavior is part of the language specification since
 1981 when it first originated, it is a strict superset of C. Because it's
 a strict superset of C it unfortunately does not have namespaces. By
 extension nil and Nil are is also part of the ObjC++ language
 specification, and have been for years. Fusion seems to have been
 introduced in version 1.35.0 on March 29th 2008. The problem is that
 there is a name space conflict with some language keywords.

 In 2008, there was really no reason to consider ObjC++ and was thus the
 library was not written with ObjC++ in mind. This was a perfectly
 reasonable thing at the time. The rapid rise of OS X and iOS have
 increased the need to use boost on those platforms. Since Fusion is used
 in many places in boost, the fact that it won't compile due to a language
 keyword conflict is an issue that prevents large parts of boost being used
 easily on those operating systems.

 The best work around I have found is to use pure C code to interface into
 the code using maps of integers to objects for handles. It's such a pain,
 I just don't use those modules of Boost that require fusion, even though
 many of them are perfect for what I need to do. I just end up reinventing
 those parts of boost poorly.

 When I originally ran into the problem, I was using the header only
 libraries. All I had to do to duplicate the issue was to create an
 objective-c command line project in Xcode. Then I changed the main file
 extension to mm which instructs Xcode to use the Objective C++ compiler.
 I then included headers for fusion at the top of the file without changing
 the code. The build would fail to build because it couldn't parse the
 header files.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5010#comment:27>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:13 UTC