[ConceptGCC] |
ConceptGCC :Re: Addable |
From: Doug Gregor (dgregor_at_[hidden])
Date: 2007-03-08 15:54:52
On Mar 8, 2007, at 2:50 PM, Martin Sebor wrote:
> Okay, thanks.
>
> I don't think it's part of the proposal but I think it might
> be useful to make it possible to use the same syntax in
> non-template code as within templates. Maybe via a using
> declaration or directive:
>
> int main () {
> foo a, b;
> using std::Addable<foo>::operator+;
> // or using std::Addable<foo> to get all signatures
> foo c = a + b;
> }
>
> Has this been considered and would it be feasible?
It's been considered, but it does not appear feasible. Doing
something like this:
using std::Addable<int>::operator+;
means that we would essentially be changing the meaning of the built-
in operator+ for integers (!)
Cheers,
Doug