Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
34be669
[ntuple] fix argument comment
jblomer May 26, 2026
4ad0311
[io] fix casting through void
jblomer May 26, 2026
4459931
[RVec] avoid unnecessary capacity check in internal set_size
jblomer May 27, 2026
589d342
[ntuple] avoid throwing impossible exception
jblomer May 27, 2026
947bb8e
[ntuple] don't throw in RNTupleModel::~RUpdater()
jblomer May 27, 2026
a7521f6
[ntuple] safer use of RException
jblomer May 27, 2026
1919dae
[core] make RException nothrow copy constructible
jblomer May 27, 2026
fd7bde8
[ntuple] fix throwing exception in RNTupleDescriptor
jblomer May 27, 2026
a207127
[ntuple] remove wrong forward declaration of RFieldVisitor
jblomer May 27, 2026
486f0e0
[core] fix definition of kMaxULong
jblomer May 27, 2026
44f19af
[ntuple] minor improvement in optional assignments
jblomer May 27, 2026
2edc6d7
[ntuple] minor readability improvement
jblomer May 27, 2026
fdfd600
[ntuple] minor improvement in RPageSourceFile::CreateFromAnchor()
jblomer May 27, 2026
367c2a3
[ntuple] remove unused variable in RFieldBase::Create()
jblomer May 27, 2026
1a28ee6
[ntuple] fix use-after-move in RNTupleDescriptorBuilder::AddColumn()
jblomer May 27, 2026
e2b41f9
[NFC][ntuple] suppress clang-tidy false positive
jblomer May 27, 2026
60d6224
[ntuple] fix widening method visibility change
jblomer May 27, 2026
91a71df
[ntuple] remove unusued usings
jblomer May 27, 2026
c3d72c3
[ntuple] private linkage of stream operator in the merger
jblomer May 27, 2026
39bcdcc
[ntuple] replace std::endl by \n
jblomer May 27, 2026
199dc1f
[ntuple] minor performance improvement in RPageSourceFile::LoadCluste…
jblomer May 27, 2026
db55e5f
[core] pass RError::RLocation by const ref
jblomer May 27, 2026
5f71359
[ntuple] use member move in RValue move ctor
jblomer May 27, 2026
269a42b
[ntuple] minor perf improvement in type name normalization
jblomer May 27, 2026
b27ea8c
[ntuple] make moving RPage(Ref) noexcept
jblomer May 27, 2026
e0f099a
[ntuple] avoid some unnecessary value copies
jblomer May 28, 2026
750cab3
[core] remove unnecessary declaration in RResult
jblomer May 28, 2026
a6d7d43
[ntuple] mark some move constructors noexcept
jblomer May 28, 2026
5bfe3e6
[RVec] improve noexcept specification
jblomer May 28, 2026
a640984
[ntuple] fix virtual destructor visibility
jblomer May 28, 2026
5cf7a43
[ntuple] fix up RNTupleDescriptorBuilder::SetNTuple() signature
jblomer May 28, 2026
2c93778
[ntuple] remove duplicate includes
jblomer May 28, 2026
b643f1e
[core] minor improvement in TIterator
jblomer May 28, 2026
ab18e8d
[NFC][ntuple] suppress cling-tidy warning for RKeyBlob
jblomer Jun 8, 2026
eb0f083
[meta] fix string_view use in TClassEdit::GetUniquePtrType()
jblomer Jun 25, 2026
72c5f56
[core] add v6.46 deprecation macro
jblomer Jun 25, 2026
afe3c4e
[meta] deprecate TClassEdit::GetUniquePtrType()
jblomer Jun 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/base/inc/TBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ template <class Tmpl> TBuffer &operator>>(TBuffer &buf, Tmpl *&obj)
// since the pointer could be zero (so typeid(*obj) is not usable).

auto cl = TClass::GetClass<Tmpl>();
obj = (Tmpl *) ( (void*) buf.ReadObjectAny(cl) );
obj = reinterpret_cast<Tmpl *>(buf.ReadObjectAny(cl));
return buf;
}

Expand Down
3 changes: 1 addition & 2 deletions core/cont/inc/TCollection.h
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,7 @@ class TIter {
}
TIter &operator=(TIterator *iter)
{
if (fIterator)
delete fIterator;
delete fIterator;
fIterator = iter;
return *this;
}
Expand Down
6 changes: 6 additions & 0 deletions core/foundation/inc/ROOT/RConfig.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,12 @@
#define _R__DEPRECATED_644(REASON) _R_DEPRECATED_REMOVE_NOW(REASON)
#endif

#if ROOT_VERSION_CODE <= ROOT_VERSION(6, 45, 0)
#define _R__DEPRECATED_646(REASON) _R__DEPRECATED_LATER(REASON)
#else
#define _R__DEPRECATED_646(REASON) _R_DEPRECATED_REMOVE_NOW(REASON)
#endif

/* USE AS `R__DEPRECATED(7,00, "Not threadsafe; use TFoo::Bar().")`
To be removed by 7.00 */
#if ROOT_VERSION_CODE < ROOT_VERSION(6,99,0)
Expand Down
51 changes: 37 additions & 14 deletions core/foundation/inc/ROOT/RError.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ private:

public:
/// Used by R__FAIL
RError(std::string_view message, RLocation &&sourceLocation);
RError(std::string_view message, const RLocation &sourceLocation);
/// Used by R__FORWARD_RESULT
void AddFrame(RLocation &&sourceLocation);
void AddFrame(const RLocation &sourceLocation);
/// Add more information to the diagnostics
void AppendToMessage(std::string_view info) { fMessage += info; }
/// Format a dignostics report, e.g. for an exception message
Expand All @@ -76,11 +76,36 @@ public:
*/
// clang-format on
class RException : public std::runtime_error {
RError fError;
std::optional<RError> fError;

public:
explicit RException(const RError &error) : std::runtime_error(error.GetReport()), fError(error) {}
const RError &GetError() const { return fError; }
RException(const RException &other) noexcept : std::runtime_error(other)
{
// A copy constructor of an exception should not throw; otherwise, during `throw RException(...)`,
// a second exception may be thrown that would immediately terminate the program.
// The fError member may throw due to the memory allocation in its string and vector members.
Comment thread
silverweed marked this conversation as resolved.
try {
fError = other.fError;
Comment thread
jblomer marked this conversation as resolved.
} catch (...) {
// OOM? Leave fError unset.
(void)fError;
}
}
RException(RException &&other) = default;
RException &operator=(RException &&other) = default;
RException &operator=(const RException &other) = default;

const RError &GetError() const
{
if (!fError) {
static const RError gOomError = RError("invalid fError in exception, possibly out of memory'",
{R__LOG_PRETTY_FUNCTION, __FILE__, __LINE__});

return gOomError;
}
return *fError;
}
};

// clang-format off
Expand Down Expand Up @@ -125,12 +150,12 @@ public:

/// Used by R__FORWARD_ERROR in order to keep track of the stack trace.
[[nodiscard]]
static RError ForwardError(RResultBase &&result, RError::RLocation &&sourceLocation)
static RError ForwardError(const RResultBase &result, const RError::RLocation &sourceLocation)
{
if (!result.fError) {
return RError("internal error: attempt to forward error of successful operation", std::move(sourceLocation));
return RError("internal error: attempt to forward error of successful operation", sourceLocation);
}
result.fError->AddFrame(std::move(sourceLocation));
result.fError->AddFrame(sourceLocation);
return *result.fError;
}
}; // class RResultBase
Expand Down Expand Up @@ -224,13 +249,11 @@ public:
RResult &operator=(const RResult &other) = delete;
RResult &operator=(RResult &&other) = default;

~RResult() = default;

/// Used by R__FORWARD_RESULT in order to keep track of the stack trace in case of errors
RResult &Forward(RError::RLocation &&sourceLocation)
RResult &Forward(const RError::RLocation &sourceLocation)
{
if (fError)
fError->AddFrame(std::move(sourceLocation));
fError->AddFrame(sourceLocation);
return *this;
}

Expand Down Expand Up @@ -277,10 +300,10 @@ public:
~RResult() = default;

/// Used by R__FORWARD_RESULT in order to keep track of the stack trace in case of errors
RResult &Forward(RError::RLocation &&sourceLocation)
RResult &Forward(const RError::RLocation &sourceLocation)
{
if (fError)
fError->AddFrame(std::move(sourceLocation));
fError->AddFrame(sourceLocation);
return *this;
}

Expand All @@ -300,7 +323,7 @@ public:
/// Short-hand to return an RResult<T> value from a subroutine to the calling stack frame
#define R__FORWARD_RESULT(res) std::move(res.Forward({R__LOG_PRETTY_FUNCTION, __FILE__, __LINE__}))
/// Short-hand to return an RResult<T> in an error state (i.e. after checking)
#define R__FORWARD_ERROR(res) res.ForwardError(std::move(res), {R__LOG_PRETTY_FUNCTION, __FILE__, __LINE__})
#define R__FORWARD_ERROR(res) res.ForwardError(res, {R__LOG_PRETTY_FUNCTION, __FILE__, __LINE__})

} // namespace ROOT

Expand Down
6 changes: 4 additions & 2 deletions core/foundation/inc/RtypesCore.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class TRootIOCtor;

//---- types -------------------------------------------------------------------

// clang-format off
typedef char Char_t; ///< Character 1 byte (char) \warning Can be signed (most common) or unsigned depending on platform and compiler flags. \deprecated Consider replacing with `char`, `signed char` or `std::int8_t`
typedef unsigned char UChar_t; ///< Unsigned Character 1 byte (unsigned char) \deprecated Consider replacing with `unsigned char` or `std::uint8_t`
typedef short Short_t; ///< Signed Short integer 2 bytes (short) \deprecated Consider replacing with `short` or `std::int16_t`
Expand All @@ -64,7 +65,7 @@ typedef int Seek_t; ///< File pointer (int).
typedef long Long_t; ///< Signed long integer 8 bytes (long). Size depends on architecture \deprecated Consider replacing with `long`
typedef unsigned long ULong_t; ///< Unsigned long integer 8 bytes (unsigned long). Size depends on architecture \deprecated Consider replacing with `unsigned long`
#else
typedef int Seek_t; ///< File pointer (int).
typedef int Seek_t; ///< File pointer (int).
typedef long Long_t; ///< Signed long integer 4 bytes (long). Size depends on architecture \deprecated Consider replacing with `long`
typedef unsigned long ULong_t; ///< Unsigned long integer 4 bytes (unsigned long). Size depends on architecture \deprecated Consider replacing with `unsigned long`
#endif
Expand Down Expand Up @@ -119,7 +120,7 @@ constexpr UInt_t kMaxUInt = UInt_t(~0); ///< \deprecated Consider replaci
constexpr Int_t kMaxInt = Int_t(kMaxUInt >> 1);///< \deprecated Consider replacing with `std::numeric_limits<int>::max()` (or `std::int32_t`)
constexpr Int_t kMinInt = -kMaxInt - 1; ///< \deprecated Consider replacing with `std::numeric_limits<int>::lowest()` (or `std::int32_t`)

constexpr ULong_t kMaxULong = ULong_t(~0); ///< \deprecated Consider replacing with `std::numeric_limits<unsigned long>::max()`
constexpr ULong_t kMaxULong = ULong_t(-1); ///< \deprecated Consider replacing with `std::numeric_limits<unsigned long>::max()`
constexpr Long_t kMaxLong = Long_t(kMaxULong >> 1);///< \deprecated Consider replacing with `std::numeric_limits<long>::max()`
constexpr Long_t kMinLong = -kMaxLong - 1; ///< \deprecated Consider replacing with `std::numeric_limits<long>::lowest()`

Expand All @@ -129,6 +130,7 @@ constexpr Long64_t kMinLong64 = -kMaxLong64 - 1; ///< \deprecated Cons

constexpr ULong_t kBitsPerByte = 8; ///< \deprecated Consider replacing with `std::numeric_limits<unsigned char>::digits`.
constexpr Ssiz_t kNPOS = ~(Ssiz_t)0;///< The equivalent of `std::string::npos` for the ROOT class TString. \note Consider using std::string instead of TString whenever possible
// clang-format on

//---- debug global ------------------------------------------------------------

Expand Down
4 changes: 2 additions & 2 deletions core/foundation/inc/TClassEdit.h
Original file line number Diff line number Diff line change
Expand Up @@ -236,12 +236,12 @@ namespace TClassEdit {
{
return 0 == name.compare(0, 17, "std::__pair_base<") || 0 == name.compare(0, 12, "__pair_base<");
}
inline std::string GetUniquePtrType(std::string_view name)
Comment thread
jblomer marked this conversation as resolved.
inline std::string R__DEPRECATED(6, 46, "not needed anymore") GetUniquePtrType(std::string_view name)
{
// Find the first template parameter
std::vector<std::string> v;
int i;
GetSplit(name.data(), v, i);
GetSplit(std::string(name).c_str(), v, i);
return v[1];
}
std::string GetNameForIO(const std::string& templateInstanceName,
Expand Down
6 changes: 3 additions & 3 deletions core/foundation/src/RError.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ std::string ROOT::RError::GetReport() const
return report;
}

ROOT::RError::RError(std::string_view message, RLocation &&sourceLocation) : fMessage(message)
ROOT::RError::RError(std::string_view message, const RLocation &sourceLocation) : fMessage(message)

{
// Avoid frequent reallocations as we move up the call stack
fStackTrace.reserve(32);
AddFrame(std::move(sourceLocation));
AddFrame(sourceLocation);
}

void ROOT::RError::AddFrame(RLocation &&sourceLocation)
void ROOT::RError::AddFrame(const RLocation &sourceLocation)
{
fStackTrace.emplace_back(sourceLocation);
}
Expand Down
Loading
Loading