From aa126e178bcb6c7f48e45ac8f5c1c8aac8751cfd Mon Sep 17 00:00:00 2001 From: Olivier Parcollet Date: Sun, 8 Jun 2014 19:18:39 +0200 Subject: [PATCH] update for xcode 5.1.1 - clang 3.4 on default Os X. - automatically in C++14 mode. - a little fix in clef (var >> ...) because of an apparent bug in auto detection in clang. --- cmake/FindCompilerCheck.cmake | 2 +- triqs/clef/clef.c14.hpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cmake/FindCompilerCheck.cmake b/cmake/FindCompilerCheck.cmake index 7b0af8ba..bdc9daba 100644 --- a/cmake/FindCompilerCheck.cmake +++ b/cmake/FindCompilerCheck.cmake @@ -47,7 +47,7 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") # does not always work ... To be fixed when clang 3.4 officially released and on OS X. if(NOT compiler_version VERSION_LESS "3.4") - #set (compiler_is_c14 ON) + set (compiler_is_c14 ON) endif() elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Intel") diff --git a/triqs/clef/clef.c14.hpp b/triqs/clef/clef.c14.hpp index 55755a4d..21e51589 100644 --- a/triqs/clef/clef.c14.hpp +++ b/triqs/clef/clef.c14.hpp @@ -380,7 +380,8 @@ namespace triqs { namespace clef { template ph_list var( placeholder ...) { return {};} template - decltype(auto) operator >> (ph_list, Expr const & ex) { return make_function(ex, placeholder()...);} + auto operator >> (ph_list &&, Expr const & ex) ->decltype(make_function(ex, placeholder()...)) { return make_function(ex, placeholder()...);} + // add trailing as a workaround around a clang bug here on xcode 5.1.1 (?) /* -------------------------------------------------------------------------------------------------- * make_function