Import Geant4 11.0.1 source tree

This commit is contained in:
Gabriele Cosmo
2022-03-23 08:25:50 +01:00
parent 84f33a068c
commit de4f28d823
234 changed files with 61815 additions and 61766 deletions
+7
View File
@@ -16,6 +16,13 @@ commit in the repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
March 8, 2022 Gabriele Cosmo (global-V10-07-38)
- Updated tag IDs for geant4-11-00-patch-01.
February 18, 2022 Ben Morgan (global-V10-07-37)
- Provide overload G4String::operator[](int) to workaround MSVC compiler
error C2666. Addressing problem report #2463.
December 3, 2021 Gabriele Cosmo (global-V10-07-36)
- Updated tag IDs for geant4-11-00-ref-00.
@@ -96,6 +96,21 @@ class G4String : public std::string
/// to match the `std::string` interface.
inline operator const char*() const;
/// @brief Override of subscript operator for `int` to suppress C2666 errors with MSVC
/// @deprecated Will be removed at the same time as `operator const char*` that requires it
///
/// This override is required because of G4String's provision of an implicit conversion
/// operator to `const char*`. Together with the subscript operator and C++'s built-in
/// `operator[](const char*, int) operator, use of G4String::operator[] will trigger
/// [MSVC error C2666](https://docs.microsoft.com/en-us/cpp/error-messages/compiler-errors-2/compiler-error-c2666?view=msvc-170)
/// This is a known issue with mixing implicit conversion to `const char*` and subscript
/// operators. Provision of the override with `int` argument is thus a workaround
/// until the conversion operator is removed.
inline reference operator[](int);
/// @overload
inline const_reference operator[](int) const;
/// @brief Deprecated function
/// @deprecated Use `std::string::compare` or `G4StrUtil::icompare` instead
[[deprecated("Use std::string::compare, or G4StrUtil::icompare for case-insensitive comparison")]]
@@ -62,6 +62,16 @@ inline G4String& G4String::operator=(G4String&& str)
inline G4String::operator const char*() const { return c_str(); }
inline G4String::reference G4String::operator[](int pos)
{
return std::string::operator[](pos);
}
inline G4String::const_reference G4String::operator[](int pos) const
{
return std::string::operator[](pos);
}
inline G4int G4String::compareTo(std::string_view str, caseCompare mode) const
{
if(mode == exact)
@@ -40,11 +40,11 @@
// |--> patch number
#ifndef G4VERSION_NUMBER
#define G4VERSION_NUMBER 1100
#define G4VERSION_NUMBER 1101
#endif
#ifndef G4VERSION_TAG
#define G4VERSION_TAG "$Name: geant4-11-00 $"
#define G4VERSION_TAG "$Name: geant4-11-00-patch-01 $"
#endif
// as variables
@@ -53,10 +53,10 @@
#include "G4Types.hh"
#ifdef G4MULTITHREADED
static const G4String G4Version = "$Name: geant4-11-00 [MT]$";
static const G4String G4Version = "$Name: geant4-11-00-patch-01 [MT]$";
#else
static const G4String G4Version = "$Name: geant4-11-00 $";
static const G4String G4Version = "$Name: geant4-11-00-patch-01 $";
#endif
static const G4String G4Date = "(10-December-2021)";
static const G4String G4Date = "(8-March-2022)";
#endif