
On Wed, Mar 23, 2005 at 10:01:21AM -0800, Eric Niebler wrote:
Jonathan Wakely wrote:
On Wed, Mar 23, 2005 at 04:06:09PM +0000, Joaquin M Lopez Munoz wrote:
"I can't think of any way that this extension could break a conforming program, considering that users are not permitted to forward-declare standard library components"
Is this really so? Why cannot I forward declare a stdlib component?
Opening namespace std for anything except specialisations of standard library templates (with user-defined types as parameters) is illegal.
OK, but that has never stopped us (Boost) from doing it before. config/suffix.hpp defines std::min and std::max for non-compliant std libs. lambda/detail/operator_return_type_traits.hpp forward-declares std::complex<>. I don't see anything particularly wrong with that, except that perhaps forward-declarations of std types should be moved into the config sub-project to better handle the variety in different std libs.
I was never suggesting Boost shouldn't do it, (I also pointed out that it's done already for BOOST_NO_STDC_NAMESPACE,) I was just giving a likely rationale for the comment in the DR, which is what I thought Joaquin was asking about. The fact that you can get away with it safely in practice doesn't mean it's legal. I think I'll quit while I'm behind :) jon