<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>29186</bug_id>
          
          <creation_ts>2013-07-15 15:17:27 +0400</creation_ts>
          <short_desc>fill_n, generate_n assume Size is modifiable</short_desc>
          <delta_ts>2013-07-19 05:21:23 +0400</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>Distributions</classification>
          <product>Branch p6</product>
          <component>libstdc++4.5-devel</component>
          <version>не указана</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25306</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Anton Farygin">rider</reporter>
          <assigned_to name="Andrey Cherepanov">cas</assigned_to>
          <cc>ldv</cc>
          
          <qa_contact name="QA p6">qa-p6</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>141517</commentid>
    <comment_count>0</comment_count>
    <who name="Anton Farygin">rider</who>
    <bug_when>2013-07-15 15:17:27 +0400</bug_when>
    <thetext>Нарвался на эту ошибку в gcc.

Просьба приложить патч:
http://gcc.gnu.org/viewcvs/gcc?view=revision&amp;revision=159677

testcase:

#include &lt;algorithm&gt;

struct Size {
    operator int() { return 0; }
private:
    void operator=(Size&amp;);
};

template int* std::fill_n (int*, Size, const int&amp;);
template int* std::generate_n (int*, Size, int (*)());

int main () { }</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>141644</commentid>
    <comment_count>1</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2013-07-18 17:42:07 +0400</bug_when>
    <thetext>Патч выглядит безобидным, можно было бы и приложить.

В апстримной ветке gcc-4_5-branch после выпуска 4.5.4 коммитов не было, очевидно, эта ветка закрыта год назад.
Зато в gcc-4_6-branch, в которой находится обсуждаемый фикс на bits/stl_algobase.h и bits/stl_algo.h, есть еще много разных полезных фиксов, возможно, с побочными эффектами.

Лучше, конечно, пользоваться более свежими компиляторами.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>141663</commentid>
    <comment_count>2</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2013-07-19 05:21:23 +0400</bug_when>
    <thetext>gcc4.5-4.5.4-alt2 -&gt; sisyphus:

* Thu Jul 18 2013 Dmitry V. Levin &lt;ldv@altlinux&gt; 4.5.4-alt2
- libstdc++4.5-devel: backported upstream fix for gcc#25306
  (closes: #29186).</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>