getfem-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Errors compiling with clang


From: Yves Renard
Subject: Re: Errors compiling with clang
Date: Fri, 16 Apr 2021 13:45:04 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1

Dear Sam,

I have no experience with clang (I use gcc on Mac). May be, the add of the "explicit" c++ keyword on the definition of the constructors for the class ga_workspace (lines 593 and 595 of src/getfem/getfem_generic_assembly.h) could help.

Best regards,

Yves

On 15/04/2021 00:28, Sam Meizlish wrote:
Hello all,

I'm currently attempting to build getfem for Mac with the current clang (LLVM 9.1.0) and am getting this error:

In file included from getfem_generic_assembly_functions_and_operators.cc:22:
In file included from ./getfem/getfem_generic_assembly_semantic.h:41:
In file included from ./getfem/getfem_generic_assembly_tree.h:42:
In file included from ./getfem/getfem_generic_assembly.h:42:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/map:629:15: error: object of       type 'std::__1::pair<std::__1::basic_string<char>, getfem::ga_workspace::var_description>' cannot be assigned because its
      copy assignment operator is implicitly deleted
        {__nc = __v.__cc; return *this;}

(in instantiation of function blah blah, and so on) then:

./getfem/getfem_generic_assembly.h:263:9: note: in instantiation of member function 'std::__1::map<std::__1::basic_string<char>,       getfem::ga_workspace::var_description, std::__1::less<std::__1::basic_string<char> >,       std::__1::allocator<std::__1::pair<const std::__1::basic_string<char>, getfem::ga_workspace::var_description> >
      >::operator=' requested here
  class ga_workspace {

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/utility:325:5: note: copy
      assignment operator is implicitly deleted because
      'pair<std::__1::basic_string<char>, getfem::ga_workspace::var_description>' has a user-declared move constructor
    pair(pair&&) = default;

This seems to occur wherever a ga_workspace object is assigned from using "=", for instance
local_workspace = gaf.local_workspace;
(from getfem_generic_assembly_functions_and_operators.cc, line 708). I'm already way out of my depth here but haven't found anything helpful just googling around, nor have I been able to replicate the error from scratch. If anyone has dealt with this or understands what clang is on about, I'd love to hear it!

Thanks,
Sam


--

  Yves Renard (Yves.Renard@insa-lyon.fr)       tel : (33) 04.72.43.87.08
  INSA-Lyon
  20, rue Albert Einstein
  69621 Villeurbanne Cedex, FRANCE
  http://math.univ-lyon1.fr/~renard

---------




reply via email to

[Prev in Thread] Current Thread [Next in Thread]