diff --git a/triqs/clef/clef.hpp b/triqs/clef/clef.hpp index 69bc9f3a..74b0bc49 100644 --- a/triqs/clef/clef.hpp +++ b/triqs/clef/clef.hpp @@ -458,8 +458,9 @@ namespace triqs { namespace clef { public: function():_fnt_ptr{std::make_shared ()}{} - template - explicit function(Expr const & _e, X... x) : _exp(new Expr(_e)),_fnt_ptr(new std_function_type(make_function(_e, x...))){} + template + explicit function(Expr const& _e, X... x) + : _exp(std::make_shared(_e)), _fnt_ptr(new std_function_type(make_function(_e, x...))) {} ReturnType operator()(T const &... t) const { return (*_fnt_ptr)(t...);} @@ -468,7 +469,7 @@ namespace triqs { namespace clef { template friend void triqs_clef_auto_assign (function const & x, RHS rhs) { * (x._fnt_ptr) = std_function_type (rhs); - x._exp = std::shared_ptr (new typename std::remove_cv::type (rhs.ex)); + x._exp = std::make_shared::type> (rhs.ex); } }; diff --git a/triqs/mc_tools/mc_measure_set.hpp b/triqs/mc_tools/mc_measure_set.hpp index 69c98f43..a103654d 100644 --- a/triqs/mc_tools/mc_measure_set.hpp +++ b/triqs/mc_tools/mc_measure_set.hpp @@ -54,7 +54,7 @@ namespace triqs { namespace mc_tools { template void construct_delegation (MeasureType * p) { - impl_= std::shared_ptr (p); + impl_= std::shared_ptr (p); clone_ = [p]() { return MeasureType(*p);} ; hash_ = typeid(MeasureType).hash_code(); type_name_ = typeid(MeasureType).name(); diff --git a/triqs/mc_tools/mc_move_set.hpp b/triqs/mc_tools/mc_move_set.hpp index e8f474f3..f7d8f0a6 100644 --- a/triqs/mc_tools/mc_move_set.hpp +++ b/triqs/mc_tools/mc_move_set.hpp @@ -58,7 +58,7 @@ namespace triqs { namespace mc_tools { template void construct_delegation (MoveType * p) { - impl_= std::shared_ptr (p); + impl_= std::shared_ptr (p); hash_ = typeid(MoveType).hash_code(); type_name_ = typeid(MoveType).name(); clone_ = [p](){return MoveType(*p);}; diff --git a/triqs/parameters/opaque_object_h5.hpp b/triqs/parameters/opaque_object_h5.hpp index 6938a530..5909cd7d 100644 --- a/triqs/parameters/opaque_object_h5.hpp +++ b/triqs/parameters/opaque_object_h5.hpp @@ -101,7 +101,7 @@ namespace triqs { namespace utility { private: template void delegate_constructor( T * obj, std::string const & name) { - p = std::shared_ptr (obj); + p = std::shared_ptr (obj); type_code_ = type_code(); name_ = name; clone_ = [obj,name]() { return _object( *obj, name);} ;