Skip to content
Snippets Groups Projects
Commit f1c8a7e5 authored by Rosen Matev's avatar Rosen Matev :sunny:
Browse files

Merge branch 'remove-small_vector-workaround' into 'master'

Remove workaround for ROOT/cling problem with Boost small_vector

Closes #75

See merge request !2389
parents 084372b3 3ca5c71a
No related branches found
No related tags found
2 merge requests!3702merge counter decoder into Louis' original branch,!2389Remove workaround for ROOT/cling problem with Boost small_vector
Pipeline #3631005 passed
......@@ -95,11 +95,11 @@ namespace Rich {
using RadiatorArray = std::array<TYPE, NRadiatorTypes>;
/// Type for container of detector types
using Detectors = boost::container::small_vector<DetectorType, N_DETECTOR_TYPES, void, void>;
using Detectors = boost::container::small_vector<DetectorType, N_DETECTOR_TYPES>;
/// Type for container of side types
using Sides = boost::container::small_vector<Side, N_SIDE_TYPES, void, void>;
using Sides = boost::container::small_vector<Side, N_SIDE_TYPES>;
/// Type for container of radiator types
using Radiators = boost::container::small_vector<RadiatorType, N_RADIATOR_TYPES, void, void>;
using Radiators = boost::container::small_vector<RadiatorType, N_RADIATOR_TYPES>;
/// Access all valid detector types
inline Detectors detectors() noexcept { return {Rich::Rich1, Rich::Rich2}; }
......
......@@ -15,7 +15,6 @@
// the small_vector header seems to avoid clang8 errors..
#include <boost/container/small_vector.hpp>
#include <boost/version.hpp>
#include <gsl/span>
......@@ -66,15 +65,8 @@ namespace LHCb::Arena {
/// One byte past the end of the current block, or nullptr if it doesn't exist.
std::byte* m_current_end{nullptr};
// Explicitly specify boost::container::small_vector default template arguments
// to sidestep cling error, see lhcb/LHCb#75
#if BOOST_VERSION < 107100
/// All memory blocks owned by this arena.
boost::container::small_vector<gsl::span<std::byte>, 1, void> m_all_blocks;
#else
/// All memory blocks owned by this arena.
boost::container::small_vector<gsl::span<std::byte>, 1, void, void> m_all_blocks;
#endif
boost::container::small_vector<gsl::span<std::byte>, 1> m_all_blocks;
/// Approximate factor by which each block is larger than its predecessor.
static constexpr std::size_t growth_factor = 2;
......
......@@ -29,7 +29,6 @@
// Boost
#include <boost/container/small_vector.hpp>
#include <boost/version.hpp>
// Gaudi
#include "GaudiKernel/SerializeSTL.h"
......@@ -71,13 +70,7 @@ namespace Rich {
using ParticleArray = std::array<TYPE, NParticleTypes>;
/// Type for container of particle types
// Explicitly specify boost::container::small_vector default template arguments
// to sidestep cling error, see lhcb/LHCb#75
#if BOOST_VERSION < 107100
using Particles = boost::container::small_vector<ParticleIDType, N_PARTICLE_TYPES, void>;
#else
using Particles = boost::container::small_vector<ParticleIDType, N_PARTICLE_TYPES, void, void>;
#endif
using Particles = boost::container::small_vector<ParticleIDType, N_PARTICLE_TYPES>;
/// Access all valid particle ID types
inline Particles particles() noexcept {
......
......@@ -34,7 +34,6 @@
// Boost
#include <boost/container/small_vector.hpp>
#include <boost/version.hpp>
namespace Rich {
......@@ -54,15 +53,8 @@ namespace Rich {
class RadIntersection {
public:
// Explicitly specify boost::container::small_vector default template arguments
// to sidestep cling error, see lhcb/LHCb#75
#if BOOST_VERSION < 107100
/// Definition of a vector of intersections
using Vector = boost::container::small_vector<Rich::RadIntersection, 1, void>;
#else
/// Definition of a vector of intersections
using Vector = boost::container::small_vector<Rich::RadIntersection, 1, void, void>;
#endif
using Vector = boost::container::small_vector<Rich::RadIntersection, 1>;
public:
/// Default constructor
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment