TRIQS / triqs_0.x

DEPRECATED -- This is the repository of the older versions of TRIQS
Other
11 stars 9 forks source link

During compilation: error: in-class initializer is not a constant expression #129

Closed lmessio closed 11 years ago

lmessio commented 11 years ago

Hello, During compilation with clang in branch 1.0, I obtain:

    [ 3%] Built target triqs_utility
    [ 4%] Building CXX object triqs/CMakeFiles/triqs.dir/gf/local/functions.cpp.o
    clang: warning: argument unused during compilation: '-fpic'
    clang: warning: argument unused during compilation: '-fpic'
    In file included from /home/messio/PROGRAMMATION/TRIQS_PUBLIC/sources/triqs/gf/local/functions.cpp:22:
    In file included from /home/messio/PROGRAMMATION/TRIQS_PUBLIC/sources/triqs/gf/local/functions.hpp:24:
    In file included from /home/messio/PROGRAMMATION/TRIQS_PUBLIC/sources/triqs/gf/local/../gf.hpp:27:
    In file included from /home/messio/PROGRAMMATION/TRIQS_PUBLIC/sources/triqs/arrays/h5.hpp:23:
    In file included from /home/messio/PROGRAMMATION/TRIQS_PUBLIC/sources/triqs/arrays/./h5/simple_read_write.hpp:23:
    In file included from /home/messio/PROGRAMMATION/TRIQS_PUBLIC/sources/triqs/arrays/array.hpp:24:
    In file included from /home/messio/PROGRAMMATION/TRIQS_PUBLIC/sources/triqs/arrays/indexmaps/cuboid/map.hpp:23:
    /home/messio/PROGRAMMATION/TRIQS_PUBLIC/sources/triqs/arrays/indexmaps/cuboid/./domain.hpp:70:53: error: in-class initializer is not a constant expression
    static constexpr ull_t iteration_order_default = permutations::identity(Rank);
                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/messio/PROGRAMMATION/TRIQS_PUBLIC/sources/triqs/arrays/indexmaps/cuboid/./domain.hpp:147:46: note: in instantiation of template class
  'triqs::arrays::indexmaps::cuboid::domain_t<1>' requested here
     BOOST_PP_REPEAT_FROM_TO(1,ARRAY_NRANK_MAX , IMPL, nil);
                                         ^
    /usr/include/boost/preprocessor/repetition/repeat_from_to.hpp:36:125: note: expanded from:
    # define BOOST_PP_REPEAT_FROM_TO_1(f, l, m, dt)         BOOST_PP_REPEAT_FROM_TO_D_1(BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 256), f, l, m, dt)
                                                                                                                        ^
    /usr/include/boost/preprocessor/repetition/repeat_from_to.hpp:54:136: note: expanded from:
    #    define BOOST_PP_REPEAT_FROM_TO_D_1(d, f, l, m, dt)         BOOST_PP_REPEAT_1(BOOST_PP_SUB_D(d, l, f), BOOST_PP_REPEAT_FROM_TO_M_1, (d, f, m, dt))
                                                                                                                                   ^
    /usr/include/boost/preprocessor/repetition/repeat.hpp:38:63: note: expanded from:
    # define BOOST_PP_REPEAT_1(c, m, d) BOOST_PP_REPEAT_1_I(c, m, d)
                                                          ^
    note: (skipping 13 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
    /usr/include/boost/preprocessor/repetition/repeat_from_to.hpp:79:118: note: expanded from:
    # define BOOST_PP_REPEAT_FROM_TO_M_1_I(z, n, d, f, m, dt) BOOST_PP_REPEAT_FROM_TO_M_1_II(z, BOOST_PP_ADD_D(d, n, f), m, dt)
                                                                                                                 ^
    /usr/include/boost/preprocessor/repetition/repeat_from_to.hpp:83:54: note: expanded from:
    # define BOOST_PP_REPEAT_FROM_TO_M_1_II(z, n, m, dt) m(z, n, dt)
                                                 ^
    /home/messio/PROGRAMMATION/TRIQS_PUBLIC/sources/triqs/arrays/indexmaps/cuboid/./domain.hpp:143:49: note: expanded from:
       const mini_vector<foreach_int_type,RR>  l(dom.lengths());\
                                            ^
parcollet commented 11 years ago

Which clang version ?

parcollet commented 11 years ago

Ok, I have updated the compiler detection to clang 3.2 minimal, anyway.

parcollet commented 11 years ago

Ok, clang version detection is broken... Let's say we work with 3.2 anyway.