http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54853



--- Comment #2 from Leonid Volnitsky <leonid at volnitsky dot com> 2012-10-08 
10:54:17 UTC ---

> but there are lots of errors



Below 1-line change commit which caused  ICE

(http://github.com/lvv/scc/commit/33d60adcf9ea5307ccaf186f558c338424299a56): 



//----------------------------------------------------------------------------

diff --git c/chain_range.h w/chain_range.h

index 0d3c140..45f6f5e 100644

--- c/chain_range.h

+++ w/chain_range.h

@@ -242,7 +242,7 @@ struct  chain_range : ref_container<Rg&&> {

   template<class U=Rg> eIF<has_pop_back<U>()>  pop_back()  {rg.pop_back();}

   template<class U=Rg> eIF<has_pop_front<U>()> pop_front() {rg.pop_front();}



-  auto  operator[] (difference_type n) -> decltype(rg[n])  { return  rg[n]; }

+  template<class R=decltype(rg[0])>  R operator[] (difference_type n)  {

return  rg[n];}



   // ADDED RG METHODS

   template<class U=Rg> 

//----------------------------------------------------------------------------



I can not see were code is invalid.  Maybe you can.  I am not sure on what

branch the commit you mentioned is, but it is true, this code can not compiled

with gcc-4.8.  Because of regression bug 54648 (caused by commit 191412), gcc

can not handle constexpr in this code.  I am removing all constexpr code  as

result (and clang is even worse in this regard).

Reply via email to