|
Boost : |
From: Søren Lassen (s.lassen_at_[hidden])
Date: 2005-04-30 07:16:59
On Thu, 28 Apr 2005 21:13:39 -0400, David Abrahams
<dave_at_[hidden]> wrote:
>
> What we really need, as I have requested several times already, is a
> test program for the problem your other patch addresses. I mean the
> one that still might be valid, and that fixes the compilation failure
> on some compilers.
>
OK, here are two examples that compile on most compilers, but not Borland
5.5 (are there others that do not accept inline friend functions in
namespaces?), as fully fledged C++ programs.
Example1.cpp:
#include <boost/operators.hpp>
using namespace boost;
class a:addable1<a>{
public:
a& operator+=(const a&){return *this;};
};
int main(){
}
Example2.cpp:
#include <boost/operators.hpp>
bool addable1;
int main(){
}
If you think my proposed solution is usable, I shall be happy to write a
version of operators.hpp that implements it - but I shall be away for
holidays the next 5 weeks, so it will not be immediately. Feel free use
whatever you like from my example in the sandbox vault, if you prefer.
Sorry again for my too literal interpretation of the gudelines page - I
have probably spent too many years in corporate DP departments, where
programming guidelines are acknowledged, detailed, updated frequently,
widely disseminated, and quite often adhered to or even enforced - at
least in the sense that you have to come up with an explanation when you
deviate from the guidelines. I am not saying that this is a better way of
doing things, just that I am used to doing things differently.
-- Søren
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk