Skip to content

Commit

Permalink
Merge pull request #3715 from williamfgc/libc++-bugs
Browse files Browse the repository at this point in the history
Address libc++ related bugs with no MPI compilation
  • Loading branch information
ye-luo authored Jan 7, 2022
2 parents 1ca0abf + 5b5cf7a commit 0297e87
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/QMCTools/ppconvert/src/common/Blitz.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@ struct Array : base_type{
using sizes_type = decltype(std::declval<base_type const&>().sizes());
sizes_type shape() const{return base_type::sizes();}
void resize(sizes_type sizes){resizeAndPreserve(sizes);}
void resizeAndPreserve(sizes_type sizes){base_type::reextent(sizes);}
void resizeAndPreserve(sizes_type sizes){
// explicit conversion due to failure with libc++ type automatic conversion
base_type::reextent(std::apply([](auto... ss){return typename base_type::extensions_type{static_cast<typename base_type::size_type>(ss)...};}, sizes));

}
template<class... Ints>
void resize(Ints... ns){base_type::reextent(std::make_tuple(ns...));}
typename base_type::element_ptr data() {return base_type::data_elements();}
Expand Down
1 change: 1 addition & 0 deletions src/QMCWaveFunctions/ElectronGas/HEGGrid.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "Lattice/CrystalLattice.h"
#include <map>
#include <optional>
#include <array>

namespace qmcplusplus
{
Expand Down

0 comments on commit 0297e87

Please sign in to comment.