Compiler Error: Passing std::vector<T2> to Function Taking std::vector<T1>

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 2K views
ehrenfest
Messages
2,001
Reaction score
1
If I have a function that takes a std::vector< T1 > and I pass it a std::vector< T2 >, where T2 is publicly derived from T1, that should work, why does my compiler complain?
 
Physics news on Phys.org