Import Geant4 10.6.0 source tree

This commit is contained in:
Gabriele Cosmo
2019-12-06 15:12:28 +01:00
parent b2a62ae692
commit 5baee230e9
2997 changed files with 141580 additions and 98673 deletions
+22 -3
View File
@@ -29,9 +29,7 @@ inline bool to(const std::string& a_string,bool& a_value,bool a_def = false){
}
}
inline bool tob(const std::string& a_string,bool& a_value,bool a_def = false){
return to(a_string,a_value,a_def);
}
inline bool tob(const std::string& a_string,bool& a_value,bool a_def = false) {return to(a_string,a_value,a_def);}
}
@@ -86,4 +84,25 @@ inline bool to(std::ostream& a_out,const std::string& a_string,bool& a_value){
}
#include "typedefs"
#include <cstddef> //size_t
namespace tools {
inline bool to_size_t(const std::string& a_string,size_t& a_value,const size_t& a_def = 0){
if(sizeof(size_t)==8) {
uint64 v;
bool status = to<uint64>(a_string,v,a_def);
a_value = v;
return status;
} else { //assume 4 :
uint32 v;
bool status = to<uint32>(a_string,v,(uint32)a_def);
a_value = v;
return status;
}
}
}
#endif