Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 6 additions & 1 deletion math/vecops/inc/ROOT/RVec.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,12 @@ class R__CLING_PTRCHECK(off) SmallVectorTemplateCommon : public SmallVectorBase
// Space after 'FirstEl' is clobbered, do not add any instance vars after it.

protected:
SmallVectorTemplateCommon(size_t Size) : Base(getFirstEl(), Size) {}
SmallVectorTemplateCommon(size_t Size) : Base(nullptr, Size)
{
// We delay the initialization of fBeginX until the constructor of the derived class, to avoid doing pointer math
// on an object that is not yet fully constructed.
fBeginX = getFirstEl();
}

void grow_pod(size_t MinSize, size_t TSize) { Base::grow_pod(getFirstEl(), MinSize, TSize); }

Expand Down
3 changes: 3 additions & 0 deletions roottest/root/aclic/rvec_uninitialized/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ROOTTEST_ADD_TEST(rvec_uninitialized
MACRO rvec_uninitialized.C+
OUTREF rvec_uninitialized.ref)
7 changes: 7 additions & 0 deletions roottest/root/aclic/rvec_uninitialized/rvec_uninitialized.C
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include <ROOT/RVec.hxx>

struct RVecUninitialized {
ROOT::RVec<bool> v;
};

void rvec_uninitialized() {}
Empty file.
Loading