[ConceptGCC] |
ConceptGCC :Re: ame type constaints, references, and temporaries |
From: Doug Gregor (dgregor_at_[hidden])
Date: 2007-02-28 13:31:09
Thanks for the bug report... it appears that I've fixed this bug in
the Subversion version of ConceptGCC.
Cheers,
Doug
On Feb 15, 2007, at 5:34 PM, Jeremy Siek wrote:
>>
>> Found this one while working on the new iterator concepts and
>> iter_swap.
>>
>> /opt/conceptgcc-4.1.1-alpha-4/bin/c++ same_type_ref.cpp -o
>> same_type_ref
>> same_type_ref.cpp: In function 'void blah(X&)':
>> same_type_ref.cpp:13: error: invalid initialization of non-const
>> reference of type 'typename Iter<X>::value_type&' from a temporary
>> of type 'typename Iter<X>::reference'
>>
>> #include <concepts>
>>
>> concept Iter<typename X> {
>> typename reference;
>> typename value_type;
>> reference operator*(X);
>> };
>>
>> template<Iter X>
>> where std::SameType<X::reference, X::value_type&>
>> void blah(X& x) {
>> X::value_type& z = *x;
>> }
>>
>> int main(){ }
>
> ______________________________________
> Jeremy Siek <jeremy.siek_at_[hidden]>
> http://www.cs.colorado.edu/~siek/
> Visiting Assistant Professor
> Department of Computer Science
> University of Colorado at Boulder
>
>
>
>
> _______________________________________________
> ConceptGCC mailing list
> ConceptGCC_at_[hidden]
> http://www.osl.iu.edu/mailman/listinfo.cgi/conceptgcc