#Debugger in neovim showing vector as empty

1 messages · Page 1 of 1 (latest)

plush geode
#

smth weird is happening and i have no idea what's the reason . values was of len 4 inside loop but soon after it got reset to 0 . i not using any optimization flag and i am compilling with debugger flag via gcc

zinc spokeBOT
#

When your question is answered use !solved or the button below to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.

plush geode
#

as you can see matrix is not empty either

jagged mist
#

Try printing the size of the vector with cout, does it also print empty?

tardy barn
#

debugger on neovim ._.

tardy barn
#

oh the values

#

why are you flatting the matrix vector

#

ohh to sort it...

#

you can just not flatten the matric vector....

plush geode
plush geode
spare magnet
#

what sort function are you using?

jagged mist
#

Check your compiler flags, do you have that?

plush geode
# spare magnet what sort function are you using?

i include bits/stdc++ and use namespace std . i know this is bad but convenient for problem solving . that said this is the sort function i am using

template<typename _RandomAccessIterator>
    _GLIBCXX20_CONSTEXPR
    inline void
    sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
    {
      // concept requirements
      __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
        _RandomAccessIterator>)
      __glibcxx_function_requires(_LessThanComparableConcept<
        typename iterator_traits<_RandomAccessIterator>::value_type>)
      __glibcxx_requires_valid_range(__first, __last);
      __glibcxx_requires_irreflexive(__first, __last);

      std::__sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter());
    }

cpp functions are really unreadable to me but whatever

plush geode
spare magnet