Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ambiguous assignment operator in Geant4Output2EDM4hep.cpp on LCG macOS platforms #1130

Closed
dkonst13 opened this issue Jun 14, 2023 · 4 comments
Labels
Fixed Problem is solved Testing Waiting for caller Waiting for issue opener to respond to question

Comments

@dkonst13
Copy link

Hello,

Building master of DD4Hep we encountered a compilation error related to an ambiguous assignment operator on LCG macOS platforms. The error occurs in the following code snippet:

/Users/sftnight/build/workspace/lcg_nightly_pipeline/build/frameworks/DD4hep-master/src/DD4hep/master/DDG4/edm4hep/Geant4Output2EDM4hep.cpp:476:45: error: use of overloaded operator '=' is ambiguous (with operand types 'std::map<std::string, std::pair<edm4hep::SimCalorimeterHitCollection, edm4hep::CaloHitContributionCollection>>::mapped_type' (aka 'std::pair<edm4hep::SimCalorimeterHitCollection, edm4hep::CaloHitContributionCollection>') and 'void')
    auto& hits = m_calorimeterHits[colName] = {};
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~
/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__utility/pair.h:262:11: note: candidate function
    pair& operator=(typename conditional<
          ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__utility/pair.h:275:11: note: candidate function
    pair& operator=(typename conditional<
          ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__utility/pair.h:40:29: note: candidate function (the implicit copy assignment operator) has been implicitly deleted
struct _LIBCPP_TEMPLATE_VIS pair
                            ^

auto& hits = m_calorimeterHits[colName] = {};

@MarkusFrankATcernch
Copy link
Contributor

Aaarghh! Always the bloody macs. I will take care.

@MarkusFrankATcernch
Copy link
Contributor

@dkonst13 Does PR #1131 solve the compilation problem?

@MarkusFrankATcernch MarkusFrankATcernch added Testing Fixed Problem is solved Waiting for caller Waiting for issue opener to respond to question labels Jun 19, 2023
@MarkusFrankATcernch
Copy link
Contributor

@dkonst13 Can this issue be closed ?

@veprbl
Copy link
Contributor

veprbl commented Jul 10, 2023

Fix in 1131 looks sufficient to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed Problem is solved Testing Waiting for caller Waiting for issue opener to respond to question
Projects
None yet
Development

No branches or pull requests

3 participants