std::vector "magically" empties : I'm currently programming something needing vectors. I have two nested loops; 

    for (size_t i = 0; i < m_neurons.size(); i++) {
        	for (size_t j = 0; j < m_neurons[0].m_weights.size(); j++) {
 	        
            }
    }

This section is the one we are interested in:

		d.out ("i == " + std::to_string (i));
		d.out ("m_neurons.size() == " + std::to_string (m_neurons.size()));
		d.out ("m_neurons[i].m_weights.size() == " + std::to_string (m_neurons.at(i).m_weights.size()));
		d.out ("m_neurons[i].m_weights.size() == " + std::to_string (m_neurons.at(i).m_weights.size()));
		for (size_t j = 0; j < m_neurons[0].m_weights.size(); j++) {

I print out some sizes and then, I want C++ to loop through the vector; easy enough, right? 

Except this happens: 

    i == 0
    m_neurons.size() == 1
    m_neurons[i].m_weights.size() == 4
    m_neurons[i].m_weights.size() == 4
    terminate called after throwing an instance of 'std::out_of_range'
      what():  vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)
    Aborted (Speicherabzug geschrieben)
    [maximilian@new-host library]$ 

1) Somehow the vector gets emptied
2) Somehow, the collection of the data is treated like I used `.at (int index)`

I have:

    -tried alternating between `vector.at()` and `vector[]`
    -deleted the executable and recompiled (multiple times)
    -rebooted my pc [dunno, might help]
    -investigated with GDB (the vector changed value from one step to the other)
    -Used my mediocre googling skills to search something similar. 
    -Played a bit with the content of those vectors


I know that:

    -The vector is NOT changed in between
    -It is exactly THIS line of code that bugs out [because I have a printing s tatement exactly after]
    -I recall it working a bit earlier in the day 

Now my Questions are:

    1) Is this a known issue/feature?
    2) What caused it?
    3) How can I fix it?


