[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen <eigen@xxxxxxxxxxxxxxxxxxx>
- Subject: [eigen] a few updates...
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Wed, 22 Dec 2010 03:50:48 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=V/3CQOQtCyAVPUfXXaA1DEYcnvWiHBrkYv/Cv+1va0U=; b=dnbHYkQ0Ff7dbEO32TVNNoMHtagPw/ue3hWqA8S/c1EsbL+LvMQfUZWcC3BoIIGelA S7lJ2OGWPCn7B44UlsZkfUfeA5JryYbjheEn5u6EbbQ/3Zt5kFPifbpPIIkXozLho5Hj JPGnX20CMFn6l0O9GwfF60nx5o1gC+WLsvCd4=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=mA5z2SWSHOU8sQ012jqxvub9o9q8/3dDuAS9XVVmlW1FeYWpTZiVtSB/ccGwpUtEWp 6Bva8B2ALry5OcpHr931J+Nj1Oeyc3h0gwTkjBOEF8kDY5oIA25GW2pHWY9rCUM8kN/v qh0s/3D3avPIrhVCx1unHbkTPBzlPE/p1D93E=
I'm sorry to have been quiet lately as beta3 is getting more and more
late. Here's my current status:
* I'm done fixing bug 54 as far as I'm concerned, with a local patch.
However, due to limited internet connectivity (in vacation in that
remote place called San Francisco, they have barely heard about the
Internet there and think they can charge me 15$/night for internet in
my hotel room) I can't push my changes ... writing this from IE7 on a
windows machine in the hotel, grrr -_-
* There are 2 remaining places where I haven't fixed
const-correctness: the Sparse module (leaving this to Gael) and
swap(). I have improved the situation with swap() so that e.g. you
can't swap const Matrix's anymore, but there remains a much trickier
issue: swapping temporary expression as in:
This is incredibly tricky because C++ doesn't allow one to take
non-const references to temporaries, so one has to pass const
references and const_cast, which loses the information of whether the
expression was const in the first place.
There are 2 things we can do here:
a) leave it there with c++98 and consider using rvalue references in c++0x mode
b) actually there is a crazy aspect of c++98 that allows to fix this
problem. As I said, the fundamental issue is that C++ doesn't allow
one to take non-const references to temporaries... but that's not
entirely true, there's one case in which this is allowed: that's when
taking a reference to *this. At least insofar as GCC's behavior is
compliant with the spec. So, while the API we have for swap() can't be
fixed wrt const-correctness within c++98, this different API:
xpr1.swap() = xpr2.swap()
can be made const-correct, by implementing swap() as returning a
SwapWrapper<T>, and implementing swap() const as returning a
Do you want us to:
- stick with a) only ?
- introduce API b) and keep a) ?
- introduce API b) and keep a) as deprecated ?
- introduce API b) and remove a) from eigen3 (keep it in eigen2support) ?