Skip to content

[gcc/clang] Compilation issues #10

@Spirrwell

Description

@Spirrwell

I can't compile the tests. I believe there are a few problems

using SlotSizeType = SizeType<IteratorValueType<I>>;

I don't think it's valid trying to get the size_type from the value_type of an iterator. This sounds like it might be tricky to solve.

There's also a few constexpr void functions (constexpr static void reset_version_counts()) and these only compile on C++14 or greater, but according to the README it sounds like this is supposed to target C++11.

There are a few instances where iterators are being taken by reference in these functions:

forward_empty_filled_dense_slots_basis
forward_empty_filled_dense_slots
versioned_forward_empty_filled_dense_slots

I'm not sure if this is necessary in any way, but it does not compile and gives error: cannot bind non-const lvalue reference errors.

I haven't figured out this last error yet, but I'm getting really weird linker errors surrounding regulated_slot_list::npos. This does NOT happen with C++17 or above, but I still don't understand it.

[build] /usr/bin/ld: CMakeFiles/test_slot_list.dir/examples/slot_list/rea_test_slot_list.cpp.o: warning: relocation against `_ZN3rea19regulated_slot_listI12instrumentedNS_9get_emptyIS1_EEmmSaIS1_EE4nposE' in read-only section `.text._ZNK3rea19regulated_slot_listI12instrumentedNS_9get_emptyIS1_EEmmSaIS1_EE7_get_idEm[_ZNK3rea19regulated_slot_listI12instrumentedNS_9get_emptyIS1_EEmmSaIS1_EE7_get_idEm]'
[build] /usr/bin/ld: CMakeFiles/test_slot_list.dir/examples/slot_list/rea_test_slot_list.cpp.o: in function `rea::regulated_slot_list<instrumented, rea::get_empty<instrumented>, unsigned long, unsigned long, std::allocator<instrumented> >::_get_id(unsigned long) const':
[build] /home/spirrwell/Documents/Git/Rea/include/rea.h:1346: undefined reference to `rea::regulated_slot_list<instrumented, rea::get_empty<instrumented>, unsigned long, unsigned long, std::allocator<instrumented> >::npos'
[build] /usr/bin/ld: warning: creating DT_TEXTREL in a PIE

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions