| Summary: | G4RootAnalysisManager.cc fails to compile (vdata not STL compliant) | ||
|---|---|---|---|
| Product: | Geant4 | Reporter: | Michael Kelsey <kelsey> |
| Component: | config | Assignee: | Gabriele Cosmo <Gabriele.Cosmo> |
| Status: | RESOLVED FIXED | ||
| Severity: | minor | ||
| Priority: | P3 | ||
| Version: | 9.4 | ||
| Hardware: | Apple | ||
| OS: | Mac OS X | ||
|
Description
Michael Kelsey
2011-08-03 18:32:46 CEST
On further investigation, GCC and Intel compilers define the macro __GXX_EXPERIMENTAL_CXX0X__ in order to use new C++0x language features, such as std::vector<>::data().
The code in analysis/include/tools/vdata should be rewritten to respect this macro:
template <class T>
inline const T* vec_data(const std::vector<T>& a_vec) {
#ifdef __GXX_EXPERIMENTAL_CXX0X__
return a_vec.data();
#else
return &(a_vec.front());
#endif
}
Fix now included in tag "analysis-V09-04-05". |