|
Boost : |
From: David Abrahams (abrahams_at_[hidden])
Date: 2000-06-18 15:03:02
The using declarations that bring such names in from the global namespace
are a workaround for a very specific bug in GCC. Does Borland really suffer
from the same problems? I see that config.hpp indicates that it does:
// Borland C++ Builder 5, command-line compiler 5.5:
# define BOOST_NO_OPERATORS_IN_NAMESPACE
What a shame! And to think that bug was *added* in v. 5.5!
No, I have no better ideas than the one you've proposed. Let me know how it
works out; I'd like to get borland compatibility to work. I will also try to
address native GCC lib problems as soon as I have an answer from you.
-Dave
P.S. Fortunately, this is one of the few problems MSVC doesn't suffer from.
The inheritance trick you're proposing below wouldn't work for VC because it
gets confused when you inherit from a class of the same name in a different
namespace.
----- Original Message -----
From: "Mark Rodgers" <mark.rodgers_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Sunday, June 18, 2000 3:17 PM
Subject: [boost] operators.hpp and Borland 5.5 (was 1.15.0 Posted on web
site)
> > What problems are you having, with 5.5 exactly?
>
> It doesn't like this bit:
>
> namespace boost {
> using ::orable;
> ...
>
> For each using declaration I get
>
> Error E2102 ../..\boost/operators.hpp 367: Cannot use template
> 'orable<T,U,B,O>' without specifying specialization parameters
> Error E2272 ../..\boost/operators.hpp 367: Identifier expected
>
> It seems to be expecting a template-id, even though a template-id is
> illegal in a using declaration. I guess I could work around it with
> inheritance:
>
> namespace boost {
> template <class T
> ,class U = T
> ,class B = ::boost::detail::empty_base
> ,class O = typename is_boost_operator_template<U>::value
> >
> struct orable : ::orable<T, U, B, O> {};
> ...
>
> I haven't tried this yet though. Any better ideas?
>
> Mark
>
>
>
> ------------------------------------------------------------------------
> Wrox Wireless Developer Conference, Amsterdam, July 10-12. Choose from
> 40+ technical sessions covering application of WAP, XML, ASP, Java and
> C++ to mobile computing. Get your ticket to the future today!
> http://click.egroups.com/1/5689/3/_/9351/_/961355311/
> ------------------------------------------------------------------------
>
>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk