evaleev / libint

Libint: high-performance library for computing Gaussian integrals in quantum mechanics
Other
230 stars 96 forks source link

<any> error on macos with clang #134

Closed ajaypanyala closed 5 years ago

ajaypanyala commented 5 years ago

These errors show up on a MAC when I try to build a test program with libint. Using brew installed llvm-clang v8 (same errors with apple clang v10). Probably due to incomplete libc++ c++17 support.


In file included from /Users/code/NWChemEx/libint-install/clang8/include/libint2/cxxapi.h:95:
In file included from /Users/code/NWChemEx/libint-install/clang8/include/libint2/./engine.h:985:
/Users/code/NWChemEx/libint-install/clang8/include/libint2/./engine.impl.h:746:14: error: 
      call to unavailable function 'any_cast': introduced in macOS 10.14
      return any_cast<const operator_traits<Operator::nuclear>::oper_params_type&>(params_)
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/code/NWChemEx/libint-install/clang8/include/libint2/./engine.impl.h:750:26: error: 
      call to unavailable function 'any_cast': introduced in macOS 10.14
  ...std::get<1>(any_cast<const operator_traits<Operator::erfc_nuclear>::oper_params_type&>...
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/opt/llvm/bin/../include/c++/v1/any:582:12: note: candidate function [with
      _ValueType = const std::__1::tuple<double, std::__1::vector<std::__1::pair<double,
      std::__1::array<double, 3> >, std::__1::allocator<std::__1::pair<double,
      std::__1::array<double, 3> > > > > &] has been explicitly made unavailable
_ValueType any_cast(any const & __v)
           ^
/usr/local/opt/llvm/bin/../include/c++/v1/any:627:1: note: candidate function not viable: no
      known conversion from 'const std::__1::any' to 'const std::__1::any *' for 1st argument;
      take the address of the argument with &
any_cast(any const * __any) _NOEXCEPT
 In file included from /Users/code/NWChemEx/libint-install/clang8/include/libint2.hpp:24:
In file included from /Users/code/NWChemEx/libint-install/clang8/include/libint2/cxxapi.h:95:
In file included from /Users/code/NWChemEx/libint-install/clang8/include/libint2/./engine.h:985:
/Users/code/NWChemEx/libint-install/clang8/include/libint2/./engine.impl.h:787:30: error: 
      'bad_any_cast' is unavailable: introduced in macOS 10.14
    BOOST_PP_LIST_FOR_EACH_I(BOOST_PP_NBODYENGINE_MCR5A, _,
                             ^
/usr/local/opt/llvm/bin/../include/c++/v1/any:97:63: note: 'bad_any_cast' has been explicitly
      marked unavailable here
class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_BAD_ANY_CAST bad_any_cast : public bad_cast
                                                              ^
fatal error: too many errors emitted, stopping now [-ferror-limit=] ```