From 800aea4c5eee42354443162f86a3e8b25e1c94d0 Mon Sep 17 00:00:00 2001 From: Olivier Parcollet Date: Wed, 2 Oct 2013 21:25:32 +0200 Subject: [PATCH] remove workaround for icc 13.0 - deprecated.... - remove the TRIQS_WORKAROUND_INTEL_COMPILER_BUGS macro --- cmake/FindCompilerCheck.cmake | 2 +- cmake/triqs_config.h.in | 2 +- test/triqs/arrays/lexico_vector.cpp | 6 ---- test/triqs/arrays/mat_vec_mul2.cpp | 4 --- test/triqs/arrays/matmul2.cpp | 4 --- test/triqs/parameters/param.cpp | 4 --- triqs/arrays/impl/flags.hpp | 30 ---------------- .../arrays/indexmaps/cuboid/group_indices.hpp | 4 --- triqs/arrays/indexmaps/cuboid/mem_layout.hpp | 23 ------------- .../cuboid/slice_traversal_order.hpp | 27 --------------- triqs/arrays/indexmaps/permutation.hpp | 34 ------------------- triqs/mc_tools/mc_measure_aux_set.hpp | 19 ----------- triqs/mc_tools/mc_measure_set.hpp | 21 ------------ triqs/mc_tools/mc_move_set.hpp | 25 +------------- triqs/parameters/defaults.cpp | 17 ---------- triqs/parameters/parameters.cpp | 19 ----------- triqs/utility/scope_guard.hpp | 6 ---- triqs/utility/time_pt.hpp | 4 --- 18 files changed, 3 insertions(+), 248 deletions(-) diff --git a/cmake/FindCompilerCheck.cmake b/cmake/FindCompilerCheck.cmake index 22f9d71f..34a94613 100644 --- a/cmake/FindCompilerCheck.cmake +++ b/cmake/FindCompilerCheck.cmake @@ -89,7 +89,7 @@ ENDIF( ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") # for icc, add the very infamous flags or calculation of boost::math bessel function are wrong !! # tested on boost 1.53 IF(CMAKE_COMPILER_IS_ICC) - set(TRIQS_WORKAROUND_INTEL_COMPILER_BUGS 1) + set(TRIQS_WORKAROUND_INTEL_COMPILER_14_BUGS 1) set(BOOST_MATH_DISABLE_STD_FPCLASSIFY 1) #set(TRIQS_CXX_DEFINITIONS ${TRIQS_CXX_DEFINITIONS} -DTRIQS_WORKAROUND_INTEL_COMPILER_BUGS -DBOOST_MATH_DISABLE_STD_FPCLASSIFY) #add_definitions( -DTRIQS_WORKAROUND_INTEL_COMPILER_BUGS -DBOOST_MATH_DISABLE_STD_FPCLASSIFY) diff --git a/cmake/triqs_config.h.in b/cmake/triqs_config.h.in index a4eba415..c9d83cec 100644 --- a/cmake/triqs_config.h.in +++ b/cmake/triqs_config.h.in @@ -8,7 +8,7 @@ #cmakedefine TRIQS_BIND_FORTRAN_LOWERCASE -#cmakedefine TRIQS_WORKAROUND_INTEL_COMPILER_BUGS +#cmakedefine TRIQS_WORKAROUND_INTEL_COMPILER_14_BUGS #cmakedefine BOOST_MATH_DISABLE_STD_FPCLASSIFY #cmakedefine TRIQS_COMPILER_IS_C11_COMPLIANT diff --git a/test/triqs/arrays/lexico_vector.cpp b/test/triqs/arrays/lexico_vector.cpp index 3859e19c..c3b47076 100644 --- a/test/triqs/arrays/lexico_vector.cpp +++ b/test/triqs/arrays/lexico_vector.cpp @@ -31,8 +31,6 @@ using namespace triqs::arrays; int main(int argc, char **argv) { -#ifndef TRIQS_WORKAROUND_INTEL_COMPILER_BUGS - { vector a = { 1,3,2}, b= {2,3,1}; assert_is_true (std::lexicographical_compare(a.begin(), a.end(), b.begin(), b.end())); @@ -51,10 +49,6 @@ int main(int argc, char **argv) { vector a = {1,3,2}, b=a; assert_is_false (a Ai= {{ 1,2}, {3,4}}; matrix A= {{ 1,2}, {3,4}}; @@ -50,8 +48,6 @@ int main(int argc, char **argv) { return 0; -#endif - } diff --git a/test/triqs/arrays/matmul2.cpp b/test/triqs/arrays/matmul2.cpp index 4cfc4942..80cde0ae 100644 --- a/test/triqs/arrays/matmul2.cpp +++ b/test/triqs/arrays/matmul2.cpp @@ -25,8 +25,6 @@ using namespace triqs::arrays; int main(int argc, char **argv) { -#ifndef TRIQS_WORKAROUND_INTEL_COMPILER_BUGS - matrix C, A= {{ 1.0,2.3}, {3.1,4.3}}; matrix B= {{ 1,2}, {3,4}}; matrix Bd= {{ 1,2}, {3,4}}; @@ -42,8 +40,6 @@ int main(int argc, char **argv) { assert_all_close(A*B, A*Bd, 1.e-13); -#endif - return 0; } diff --git a/test/triqs/parameters/param.cpp b/test/triqs/parameters/param.cpp index 582d925f..6a71596e 100644 --- a/test/triqs/parameters/param.cpp +++ b/test/triqs/parameters/param.cpp @@ -14,11 +14,7 @@ struct my_obj { my_obj() { i=0;} my_obj(my_obj const & x) { i = x.i;} my_obj(my_obj && x) { std::swap(i,x.i);} -#ifndef TRIQS_WORKAROUND_INTEL_COMPILER_BUGS my_obj & operator = (my_obj && x)= default; -#else - my_obj & operator = (my_obj && x) { i = x.i; return *this;} -#endif // h5 operation friend std::string get_triqs_hdf5_data_scheme( my_obj const&) { return "myobject_is_nice";} diff --git a/triqs/arrays/impl/flags.hpp b/triqs/arrays/impl/flags.hpp index 58e4bd9b..8727c6f4 100644 --- a/triqs/arrays/impl/flags.hpp +++ b/triqs/arrays/impl/flags.hpp @@ -52,8 +52,6 @@ namespace triqs { namespace arrays { namespace flags { -#ifndef TRIQS_WORKAROUND_INTEL_COMPILER_BUGS - constexpr ull_t get(ull_t f, ull_t a) { return ((f & (1ull<> a);} constexpr ull_t get2(ull_t f, ull_t a) { return ((f & ((1ull<> a);} @@ -87,34 +85,6 @@ namespace triqs { namespace arrays { static_assert ( (!( (is_c || is_f) && To )), "You asked C or Fortran traversal order and gave a traversal order ..."); }; -#else - -#define TRIQS_FLAGS_GET(f,a) ((f & (1ull<> a) -#define TRIQS_FLAGS_GET2(f,a) ((f & ((1ull<> a) - - constexpr bool is_const (ull_t f) { return false;} // non const view on icc - -#ifdef TRIQS_ARRAYS_ENFORCE_BOUNDCHECK - template< ull_t F> struct bound_check_trait { static constexpr bool value = true;}; -#else - template< ull_t F> struct bound_check_trait { static constexpr bool value = TRIQS_FLAGS_GET (F, 5)!=0; }; -#endif - - template< ull_t F> struct traversal_order_c { static constexpr bool value = TRIQS_FLAGS_GET(F,1) !=0; }; - template< ull_t F> struct traversal_order_fortran { static constexpr bool value = TRIQS_FLAGS_GET(F,2) !=0; }; - - template< ull_t F> struct init_mode_tr { static constexpr int value = TRIQS_FLAGS_GET(F,3); }; - - template struct init_tag1; - template<> struct init_tag1<0> { typedef Tag::no_init type;}; - template<> struct init_tag1<1> { typedef Tag::default_init type;}; - template struct init_tag : init_tag1 < init_mode_tr::value > {}; - - template struct assert_make_sense { };// no check on icc -#undef TRIQS_FLAGS_GET -#undef TRIQS_FLAGS_GET2 -#endif - } }}//namespace triqs::arrays #endif diff --git a/triqs/arrays/indexmaps/cuboid/group_indices.hpp b/triqs/arrays/indexmaps/cuboid/group_indices.hpp index 8132ba0f..b800fef7 100644 --- a/triqs/arrays/indexmaps/cuboid/group_indices.hpp +++ b/triqs/arrays/indexmaps/cuboid/group_indices.hpp @@ -43,11 +43,7 @@ namespace triqs { namespace arrays { // given a m_index of indices, a metafunction to map to their position into memory template struct index_group_to_mem_pos_list; template struct index_group_to_mem_pos_list> { -#ifndef TRIQS_WORKAROUND_INTEL_COMPILER_BUGS typedef m_index < indexmaps::mem_layout::index_to_memory_rank(ML,Is)...> type; -#else - typedef m_index < indexmaps::mem_layout::index_to_memory_rank_tr::value ... > type; -#endif static_assert( get_min_max::max - get_min_max::min + 1 == sizeof...(Is), "Indices not contiguous in memory"); }; diff --git a/triqs/arrays/indexmaps/cuboid/mem_layout.hpp b/triqs/arrays/indexmaps/cuboid/mem_layout.hpp index bdbbe62e..873a72e9 100644 --- a/triqs/arrays/indexmaps/cuboid/mem_layout.hpp +++ b/triqs/arrays/indexmaps/cuboid/mem_layout.hpp @@ -42,8 +42,6 @@ namespace triqs { namespace arrays { * All these computations can be done *at compile time* (constexpr) */ -#ifndef TRIQS_WORKAROUND_INTEL_COMPILER_BUGS - constexpr int memory_rank_to_index(ull_t p, int r) { return permutations::apply(p, r);} constexpr int index_to_memory_rank(ull_t p, int r) { return permutations::apply(permutations::inverse(p), r);} @@ -65,27 +63,6 @@ namespace triqs { namespace arrays { (flags::traversal_order_fortran(fl) ? fortran_order(rank) : (to==0 ? c_order(rank) : to )));} template< int rank, ull_t fl, ull_t to> struct get_traversal_order { static constexpr ull_t value = _get_traversal_order (rank,fl,to); }; -#else - - constexpr int memory_rank_to_index(ull_t p, int r) { return permutations::apply(p, r);} - constexpr int index_to_memory_rank(ull_t p, int r) { return permutations::apply(permutations::inverse(p), r);} - - template struct index_to_memory_rank_tr { static constexpr ull_t value = permutations::apply(permutations::inverse(p), r);}; - - constexpr bool is_fortran (ull_t p){ return p == permutations::identity(permutations::size(p));} - constexpr bool is_c (ull_t p){ return p == permutations::ridentity(permutations::size(p));} - - constexpr ull_t fortran_order (int n){ return permutations::identity(n);} - constexpr ull_t c_order (int n){ return permutations::ridentity(n);} - - template struct fortran_order_tr { static constexpr ull_t value = permutations::identity(n);}; - template struct c_order_tr { static constexpr ull_t value = permutations::ridentity(n);}; - - template< int rank, ull_t fl, ull_t to> struct get_traversal_order { - static constexpr ull_t value = (flags::traversal_order_c::value ? c_order_tr::value : - (flags::traversal_order_fortran::value ? fortran_order_tr::value : (to==0 ? c_order_tr::value : to ))); - }; -#endif }} diff --git a/triqs/arrays/indexmaps/cuboid/slice_traversal_order.hpp b/triqs/arrays/indexmaps/cuboid/slice_traversal_order.hpp index bae721af..b6b8835b 100644 --- a/triqs/arrays/indexmaps/cuboid/slice_traversal_order.hpp +++ b/triqs/arrays/indexmaps/cuboid/slice_traversal_order.hpp @@ -23,7 +23,6 @@ #include "./mem_layout.hpp" namespace triqs { namespace arrays { namespace indexmaps { namespace cuboid { namespace slicing_TO_order { -#ifndef TRIQS_WORKAROUND_INTEL_COMPILER_BUGS template struct _impl{ static constexpr int n_range_ellipsis=0; static constexpr ull_t mask(ull_t mo, int P, int c) { return 0;} @@ -45,31 +44,5 @@ namespace triqs { namespace arrays { namespace indexmaps { namespace cuboid { na ( mem_layout::is_fortran(mo) ? fortran_order(_impl::n_range_ellipsis) : sliced_memory_order1(mo) )); } template struct sliced_memory_order { static constexpr ull_t value = sliced_memory_order1(mo); }; -#else - template struct mask { - static constexpr ull_t value = 0; - static constexpr int n_range_ellipsis= 0; - }; - template struct mask { - static constexpr bool is_range = std::is_base_of::value; - typedef mask

next_t; - static constexpr int n_range_ellipsis= next_t::n_range_ellipsis + is_range; - static constexpr ull_t value = ((is_range ? P+1 : 0) << (4*c)) + next_t::value; - }; - template struct _impl { static constexpr ull_t value = 0; }; - template struct _impl { - static constexpr bool is_range = std::is_base_of::value; - struct r2 { // Intel .... - static constexpr ull_t pn = permutations::apply(mo,c); - static constexpr ull_t value = (ma >> (4*(pn))) & 0xFull; - }; - static const bool r2_nozero = (r2::value!=0); - static constexpr ull_t value = (r2::value!=0 ? ( (r2::value-1) << (4*P) ) : 0)+ _impl::value; - }; - template struct sliced_memory_order { - typedef mask<0,0,Args...> mask_t; - static constexpr ull_t value = mask_t::n_range_ellipsis + 0x10* _impl::value ; - }; -#endif }}}}}//namespace triqs::arrays #endif diff --git a/triqs/arrays/indexmaps/permutation.hpp b/triqs/arrays/indexmaps/permutation.hpp index d1971a45..6d18c1a3 100644 --- a/triqs/arrays/indexmaps/permutation.hpp +++ b/triqs/arrays/indexmaps/permutation.hpp @@ -34,9 +34,6 @@ namespace triqs { namespace arrays { namespace permutations { return res; } - // icc 13.0 has a big bug in constexpr. -#ifndef TRIQS_WORKAROUND_INTEL_COMPILER_BUGS - // sum_{k=0}^{n-1} k a^k = ( (n-1) * a**(n+1) - n * a**n + a)/(a-1)**2 // sum_{k=0}^{n-1} k a^(n-k-1) = ( (n-1) - n * a + a**n)/(a-1)**2 // with a = 16, a**n = 1<<4n @@ -56,37 +53,6 @@ namespace triqs { namespace arrays { namespace permutations { constexpr ull inverse_impl(ull p, ull c) { return (c << (4*apply(p,c))) + (c>0 ? inverse_impl(p,c-1): 0 ); } constexpr ull inverse(ull p) { return size(p) + 0x10ull*inverse_impl(p,size(p)-1);} -#else - - constexpr ull _identity(ull n) { return ( (n-1ull)*(1ull<<(4*(n+1))) +(1ull<<4)- n *(1ull<<(4*n))) /( (1ull<<4) -1ull) /((1ull<<4) -1ull); } - constexpr ull identity(ull n) { return n + 0x10 * _identity(n);} - - constexpr ull _ridentity(ull n) { return ( (n-1ull) - n* (1ull<<4) + (1ull<<(4*n))) /( (1ull<<4) -1ull) /((1ull<<4) -1ull); } - constexpr ull ridentity(ull n) { return n + 0x10 *_ridentity(n); } - - // todo generalize with preproc... - constexpr ull make_perm_impl(ull i0) { return i0;} - constexpr ull make_perm_impl(ull i0, ull i1) { return i0 + 0x10ull * i1;} - constexpr ull make_perm_impl(ull i0, ull i1, ull i2) { return i0 + 0x10ull *make_perm_impl(i1,i2);} - constexpr ull make_perm_impl(ull i0, ull i1, ull i2, ull i3) { return i0 + 0x10ull *make_perm_impl(i1,i2,i3);} - constexpr ull make_perm_impl(ull i0, ull i1, ull i2, ull i3, ull i4) { return i0 + 0x10ull * make_perm_impl(i1,i2,i3,i4); } - - constexpr ull permutation(ull i0) { return 1ull + 0x10ull *make_perm_impl(i0);} - constexpr ull permutation(ull i0, ull i1) { return 2ull + 0x10ull *make_perm_impl(i0,i1);} - constexpr ull permutation(ull i0, ull i1, ull i2) { return 3ull + 0x10ull *make_perm_impl(i0,i1,i2);} - constexpr ull permutation(ull i0, ull i1, ull i2, ull i3) { return 4ull + 0x10ull *make_perm_impl(i0,i1,i2,i3);} - constexpr ull permutation(ull i0, ull i1, ull i2, ull i3, ull i4) { return 5ull + 0x10ull *make_perm_impl(i0,i1,i2,i3,i4);} - - template struct _compose { static constexpr ull invoke(ull p1, ull p2) { return apply(p2, apply(p1,c)) + 16ull * _compose::invoke(p1,p2); } }; - template<> struct _compose<15> { static constexpr ull invoke(ull p1, ull p2) { return 0ull; } }; - constexpr ull compose(ull p1, ull p2) { return size(p1) + 0x10ull* (_compose<0>::invoke(p1,p2) & ((1ull<<4*size(p1)) -1ull));} - - template struct _inverse { static constexpr ull invoke(ull p) { return (ull(c) << (4*apply(p,c))) + _inverse::invoke(p);} }; - template<> struct _inverse<15> { static constexpr ull invoke(ull p) { return 0ull; } }; - constexpr ull inverse(ull p) { return size(p) + 0x10ull*( _inverse<0>::invoke(p) - 7ull*15ull + size(p)*(size(p)-1ull)/2ull);} - -#endif - inline void print( std::ostream & out, ull perm) { out << "("; for (int i =0; i< permutations::size(perm); ++i) { out << (i!=0 ? " " : "") << apply(perm,i);} diff --git a/triqs/mc_tools/mc_measure_aux_set.hpp b/triqs/mc_tools/mc_measure_aux_set.hpp index d2147323..3d447936 100644 --- a/triqs/mc_tools/mc_measure_aux_set.hpp +++ b/triqs/mc_tools/mc_measure_aux_set.hpp @@ -63,18 +63,7 @@ namespace triqs { namespace mc_tools { //measure_aux(measure_aux &rhs) {*this = rhs;} // or it will use the template = bug measure_aux(measure_aux && rhs) = default ; //{ *this = std::move(rhs);} measure_aux & operator = (measure_aux const & rhs) { *this = rhs.clone_(); return *this;} -#ifndef TRIQS_WORKAROUND_INTEL_COMPILER_BUGS measure_aux & operator = (measure_aux && rhs) =default; -#else - measure_aux & operator = (measure_aux && rhs) noexcept { - using std::swap; -#define SW(X) swap(X,rhs.X) - SW(impl_); SW(hash_); SW(type_name_); SW(clone_); - SW(call_); -#undef SW - return *this; - } -#endif void operator()(){ call_();} @@ -102,15 +91,7 @@ namespace triqs { namespace mc_tools { measure_aux_set(measure_aux_set &&) = default; measure_aux_set& operator = (measure_aux_set const &) = default; -#ifndef TRIQS_WORKAROUND_INTEL_COMPILER_BUGS measure_aux_set& operator = (measure_aux_set &&) = default; -#else - measure_aux_set& operator = (measure_aux_set && rhs) { - using std::swap; - swap(m_map,rhs.m_map); - return *this; - } -#endif /** * Register the auxiliary M with a name diff --git a/triqs/mc_tools/mc_measure_set.hpp b/triqs/mc_tools/mc_measure_set.hpp index fbd6500f..69c98f43 100644 --- a/triqs/mc_tools/mc_measure_set.hpp +++ b/triqs/mc_tools/mc_measure_set.hpp @@ -80,19 +80,7 @@ namespace triqs { namespace mc_tools { measure(measure &rhs) {*this = rhs;} // or it will use the template = bug measure(measure && rhs) { *this = std::move(rhs);} measure & operator = (measure const & rhs) { *this = rhs.clone_(); return *this;} -#ifndef TRIQS_WORKAROUND_INTEL_COMPILER_BUGS measure & operator = (measure && rhs) =default; -#else - measure & operator = (measure && rhs) { - using std::swap; -#define SW(X) swap(X,rhs.X) - SW(impl_); SW(hash_); SW(type_name_); SW(clone_); - SW(accumulate_); SW(collect_results_); SW(h5_r); SW(h5_w); - SW(count_); -#undef SW - return *this; - } -#endif void accumulate(MCSignType signe){ assert(impl_); count_++; accumulate_(signe); } void collect_results (boost::mpi::communicator const & c ) { collect_results_(c);} @@ -126,17 +114,8 @@ namespace triqs { namespace mc_tools { measure_set(measure_set &&) = default; measure_set& operator = (measure_set const &) = default; -#ifndef TRIQS_WORKAROUND_INTEL_COMPILER_BUGS measure_set& operator = (measure_set &&) = default; -#else - measure_set& operator = (measure_set && rhs) { - using std::swap; - swap(m_map,rhs.m_map); - return *this; - } -#endif - /** * Register the Measure M with a name */ diff --git a/triqs/mc_tools/mc_move_set.hpp b/triqs/mc_tools/mc_move_set.hpp index 660fce27..e8f474f3 100644 --- a/triqs/mc_tools/mc_move_set.hpp +++ b/triqs/mc_tools/mc_move_set.hpp @@ -89,19 +89,7 @@ namespace triqs { namespace mc_tools { move(move &rhs) {*this = rhs;} // to avoid clash with tempalte construction ! move(move && rhs) { *this = std::move(rhs);} move & operator = (move const & rhs) { *this = rhs.clone_(); return *this;} -#ifndef TRIQS_WORKAROUND_INTEL_COMPILER_BUGS move & operator = (move && rhs) = default; -#else - move & operator = (move && rhs) { // how painful is icc ! - using std::swap; -#define SW(X) swap(X,rhs.X) - SW(impl_); SW(hash_); SW(type_name_); SW(clone_); - SW(attempt_); SW(accept_); SW(reject_); SW(h5_r); SW(h5_w); - SW(NProposed);SW(Naccepted); SW(acceptance_rate_); -#undef SW - return *this; - } -#endif MCSignType attempt(){ NProposed++; return attempt_();} MCSignType accept() { Naccepted++; return accept_(); } @@ -155,19 +143,8 @@ namespace triqs { namespace mc_tools { move_set(move_set const &) = default; move_set(move_set &&) = default; move_set& operator = (move_set const &) = default; -#ifndef TRIQS_WORKAROUND_INTEL_COMPILER_BUGS move_set& operator = (move_set &&) = default; -#else - move_set& operator = (move_set && rhs) { - using std::swap; -#define SW(X) swap(X,rhs.X) - SW(move_vec); SW(names_); SW(current); SW(current_move_number); SW(RNG); - SW(Proba_Moves); SW(Proba_Moves_Acc_Sum); SW(try_sign_ratio); SW(debug_counter); -#undef SW - return *this; - } -#endif - + /** * Add move M with its probability of being proposed. * NB : the proposition_probability needs to be >0 but does not need to be diff --git a/triqs/parameters/defaults.cpp b/triqs/parameters/defaults.cpp index 184a03e8..8a77bd80 100644 --- a/triqs/parameters/defaults.cpp +++ b/triqs/parameters/defaults.cpp @@ -24,29 +24,12 @@ namespace triqs { namespace utility { std::vector> parameter_defaults:: generate_help() const{ std::vector> str; -#ifndef TRIQS_WORKAROUND_INTEL_COMPILER_BUGS str.push_back({"parameter:", "status:", "type", "default value:", "description:"}); for (auto const &s : object_map){ std::string key=s.first; std::ostringstream val; val << s.second; if(is_required(key)) str.push_back({key, "required", s.second.type_name(), "-", doc(key)}); else str.push_back({key, "optional", s.second.type_name(), val.str(), doc(key)}); } -#else - std::vector v; - v.push_back("parameter:"); v.push_back("status:"); v.push_back("default value:"); v.push_back("description:"); - str.push_back(v); - for (auto const &s : object_map){ - std::string key=s.first; std::ostringstream val; val << s.second; - v.clear(); - if(is_required(key)) { - v.push_back(key); v.push_back("required"); v.push_back("-"); v.push_back(doc(key)); - } - else { - v.push_back(key); v.push_back("optional"); v.push_back(val.str()); v.push_back(doc(key)); - } - str.push_back(v); - } -#endif return str; } diff --git a/triqs/parameters/parameters.cpp b/triqs/parameters/parameters.cpp index 91fd0d13..acdf59ee 100644 --- a/triqs/parameters/parameters.cpp +++ b/triqs/parameters/parameters.cpp @@ -43,23 +43,14 @@ namespace triqs { namespace utility { std::vector> wrong_t; std::vector> no_deft; -#ifndef TRIQS_WORKAROUND_INTEL_COMPILER_BUGS std::vector desc{"key:", "description:"}; std::vector tdesc{"key:", "expected type:", "actual type:"}; -#else - std::vector desc; desc.push_back("key:"); desc.push_back("description:"); - std::vector tdesc; tdesc.push_back("key:"); tdesc.push_back("expected type:"); tdesc.push_back("actual type:"); -#endif if ( (flag & reject_key_without_default) ) { // check that no extra parameters are present for (auto const & pvp : *this) { auto key = pvp.first; if (!pdef.has_key(key)){ -#ifndef TRIQS_WORKAROUND_INTEL_COMPILER_BUGS no_deft.push_back({key}); -#else - { std::vector v; v.push_back(key); no_deft.push_back(v);} -#endif } } } @@ -71,23 +62,13 @@ namespace triqs { namespace utility { if (pdef.is_required(key) && (!this->has_key(key))){ // delay exception until all parameters have been checked if (!missing.size()) missing.push_back(desc); -#ifndef TRIQS_WORKAROUND_INTEL_COMPILER_BUGS missing.push_back({key, pdef.doc(key)}); -#else - { std::vector v; v.push_back(key); v.push_back(pdef.doc(key)); missing.push_back(v);} -#endif } if (this->has_key(key)) { // check whether the type is correct if (! have_same_type(pvp.second, (*this)[key])){ // delay exception until all parameters have been checked if (!wrong_t.size()) wrong_t.push_back(tdesc); -#ifndef TRIQS_WORKAROUND_INTEL_COMPILER_BUGS wrong_t.push_back({key, pvp.second.type_name(), (*this)[key].type_name()}); -#else - { std::vector v; v.push_back(key); v.push_back(pvp.second.type_name()); v.push_back((*this)[key].type_name()); - wrong_t.push_back(v);} -#endif - } } else { diff --git a/triqs/utility/scope_guard.hpp b/triqs/utility/scope_guard.hpp index fbf99ca8..f16ed63c 100644 --- a/triqs/utility/scope_guard.hpp +++ b/triqs/utility/scope_guard.hpp @@ -34,13 +34,7 @@ class scope_guard { void dismiss() { active_ = false; } bool active() const { return active_;} scope_guard() = delete; -#ifdef TRIQS_WORKAROUND_INTEL_COMPILER_BUGS - private: - scope_guard(const scope_guard&) = default; - public: -#else scope_guard(const scope_guard&) = delete; -#endif scope_guard(scope_guard&& rhs) : f_(std::move(rhs.f_)) , active_(rhs.active_) { rhs.dismiss(); } scope_guard& operator=(const scope_guard&) = delete; scope_guard& operator=(scope_guard&& rhs) { using std::swap; swap(f_,rhs.f_); swap(active_, rhs.active_); return *this;} diff --git a/triqs/utility/time_pt.hpp b/triqs/utility/time_pt.hpp index 70c86f0a..94ec3aa0 100644 --- a/triqs/utility/time_pt.hpp +++ b/triqs/utility/time_pt.hpp @@ -47,11 +47,7 @@ namespace triqs { namespace utility { time_pt (time_pt const &) = default; time_pt (time_pt && x) = default; time_pt & operator = (time_pt const &) = default ; -#ifndef TRIQS_WORKAROUND_INTEL_COMPILER_BUGS time_pt & operator = (time_pt && x) = default; -#else - time_pt & operator = (time_pt && x) noexcept { using std::swap; swap(n,x.n); swap(beta, x.beta); swap(val, x.val); return *this;} -#endif //this is also dangerous for reproducibility time_pt & operator = (double v) = delete;