FindKDE4Internal.cmake & clang & c++11 & -fdelayed-template-parsing

Milian Wolff mail at milianw.de
Sat Oct 12 11:42:50 BST 2013


Hey Raphael!

Thank you for working on clang support in FindKDE4Internal.cmake.

Since recently though I have build issues with clang due to the -fdelayed-
template-parsing flag passed in FindKDE4Internal.cmake. A simple example such 
as this:

#include <vector>
int main() { std::vector<int> v; return 0; }

produces with: clang++ -std=c++11 -fdelayed-template-parsing test.cpp 

In file included from test.cpp:1:
In file included from /usr/lib64/gcc/x86_64-unknown-linux-
gnu/4.8.1/../../../../include/c++/4.8.1/vector:62:
In file included from /usr/lib64/gcc/x86_64-unknown-linux-
gnu/4.8.1/../../../../include/c++/4.8.1/bits/stl_construct.h:61:
In file included from /usr/lib64/gcc/x86_64-unknown-linux-
gnu/4.8.1/../../../../include/c++/4.8.1/ext/alloc_traits.h:36:
/usr/lib64/gcc/x86_64-unknown-linux-
gnu/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);
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

Apparently, delayed template parsing is not yet mature. So - can we disable it 
in FindKDE4Internal.cmake again? Or do you know a workaround for that?

Bye
-- 
Milian Wolff
mail at milianw.de
http://milianw.de




More information about the kde-core-devel mailing list