<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Problem compiling simple application when using C++11 and -fdelayed-template-parsing"
   href="http://llvm.org/bugs/show_bug.cgi?id=17766">17766</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Problem compiling simple application when using C++11 and -fdelayed-template-parsing
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.3
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>C++11
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>jwillemsen@remedy.nl
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Testing on Fedora 19 using clang version 3.3 (tags/RELEASE_33/rc3). We have
some dependencies on another library that needs -fdelayed-template-parsing
which compiles, but we also are using C++11, which leads to some problems. When
we compile the program

#include <algorithm>

int main(int, char**)
{
return 0;
}

It compiles without problems when using 
clang++ -fdelayed-template-parsing t.cpp

also no problems when we use
clang++ -std=c++11 t.cpp

But when we combine them to
clang++ -std=c++11 -fdelayed-template-parsing t.cpp

We get a lot of errors as below. Combining both options leads to problems with
3.3

[build@fc19jslave05 ~]$ clang++ -std=c++11 -fdelayed-template-parsing t.cpp
In file included from t.cpp:1:
In file included from
/usr/lib/gcc/x86_64-redhat-linux/4.8.1/../../../../include/c++/4.8.1/algorithm:62:
In file included from
/usr/lib/gcc/x86_64-redhat-linux/4.8.1/../../../../include/c++/4.8.1/bits/stl_algo.h:62:
In file included from
/usr/lib/gcc/x86_64-redhat-linux/4.8.1/../../../../include/c++/4.8.1/bits/stl_tempbuf.h:60:
In file included from
/usr/lib/gcc/x86_64-redhat-linux/4.8.1/../../../../include/c++/4.8.1/bits/stl_construct.h:61:
In file included from
/usr/lib/gcc/x86_64-redhat-linux/4.8.1/../../../../include/c++/4.8.1/ext/alloc_traits.h:36:
/usr/lib/gcc/x86_64-redhat-linux/4.8.1/../../../../include/c++/4.8.1/bits/alloc_traits.h:57:35:
error: in-class
      initializer for static data member is not a constant expression
      static const bool __value = _S_chk<_Alloc, _Tp>(nullptr);
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-redhat-linux/4.8.1/../../../../include/c++/4.8.1/bits/alloc_traits.h:64:19:
note: in
      instantiation of template class
'std::__alloctr_rebind_helper<std::allocator<double>, double>' requested
      here
           bool = __alloctr_rebind_helper<_Alloc, _Tp>::__value>
                  ^
/usr/lib/gcc/x86_64-redhat-linux/4.8.1/../../../../include/c++/4.8.1/bits/alloc_traits.h:202:9:
note: in
      instantiation of default argument for
'__alloctr_rebind<std::allocator<double>, double>' required here
        using rebind_alloc = typename __alloctr_rebind<_Alloc, _Tp>::__type;
        ^~~~~</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>