OPAL master does not compile with NOCPLUSPLUS11_NULLPTR=ON
OPAL master does not compile (gcc 4.8.5) with build option NOCPLUSPLUS11_NULLPTR=ON with the following error:
src/Classic/AbsBeamline/RFCavity.cpp:152:27: error: call of overloaded ‘unique_ptr(NULL)’ is ambiguous frequency_td_m(nullptr)
This comes from:
which is defined as
With NOCPLUSPLUS11_NULLPTR this is translated to RNormal_m(NULL), for which multiple constructors are possible.
Since there is already quite a bit of C++11 in OPAL, instead of fixing I would suggest (but with caution as I don't know the reason for the build option) to remove the NOCPLUSPLUS11_NULLPTR (and perhaps also the similar NOCPLUSPLUS11_FOREACH).