Skip to content

[Bug]: Build error: VariableBufferPair copy constructor deleted (DeviceAgentVector_impl) when using getPopulationData #1290

@llm79

Description

@llm79

Bug Description

Description:
Build fails with the following error when compiling with CUDA 12.9 and Visual Studio 2022:

error : function "flamegpu::DeviceAgentVector_impl::VariableBufferPair::VariableBufferPair(const flamegpu::DeviceAgentVector_impl::VariableBufferPair &)" (declared implicitly) cannot be referenced -- it is a deleted function
...
instantiation of "std::list<_Ty, _Alloc>::list(const std::list<_Ty, _Alloc> &)" at line 320 of ...DeviceAgentVector_impl.h

Reproduction steps:

auto cell_api = api->agent("Cell");
auto pop_data = cell_api.getPopulationData();
for (size_t i = 0; i < pop_data.size(); ++i) {
const auto& agent = pop_data[i];
}

Environment:

Windows
CUDA 12.9
Visual Studio 2022
FLAMEGPU2 (latest release)
Expected behavior:
Build should succeed when using getPopulationData and accessing agents by reference.

To Reproduce

Description:
Build fails with the following error when compiling with CUDA 12.9 and Visual Studio 2022:

error : function "flamegpu::DeviceAgentVector_impl::VariableBufferPair::VariableBufferPair(const flamegpu::DeviceAgentVector_impl::VariableBufferPair &)" (declared implicitly) cannot be referenced -- it is a deleted function
...
instantiation of "std::list<_Ty, _Alloc>::list(const std::list<_Ty, _Alloc> &)" at line 320 of ...DeviceAgentVector_impl.h

Reproduction steps:

auto cell_api = api->agent("Cell");
auto pop_data = cell_api.getPopulationData();
for (size_t i = 0; i < pop_data.size(); ++i) {
const auto& agent = pop_data[i];
}

Environment:

Windows
CUDA 12.9
Visual Studio 2022
FLAMEGPU2 (latest release)
Expected behavior:
Build should succeed when using getPopulationData and accessing agents by reference.

Expected Behaviour

Build should succeed when using getPopulationData and accessing agents by reference.

OS

Windows 11

CUDA Versions

CUDA 12.9

GPUs

RTX 4060

GPU Driver

No response

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions