-3

If you know that your question is a duplicate, is it a good idea to ask the question anyway and mark it as a duplicate right after the creation?

I googled the question "does vector range constructor reserve capacity?" But a Stack Overflow link provided by Google had nothing to do with my question. So I started to compose a new question at Stack Overflow. During composing I reformulated my question as "does range constructor of std::vector reserve the required capacity before constructing?".

Before publishing the question I decided to try searching this (modified) formulation in Google. And Google provided me a link to the right question at Stack Overflow: Does vector know to reserve first when initializing by a pair of iterators?.

I'm still curious how Google related my search request with this Stack Overflow question since the only keywords that are common between them is vector and reserve.

Anyway, I can still create a question with my formulation, close it as a duplicate, providing a link to the existing question. And I'm sure that it will have a higher chances to be found with search requests similar to mine. So it will be helpful for some people. But is opening such duplicate questions considered a good practice?

I guess some people don't like this idea. Some people might even downvote such questions (but I personally don't care about this). But let's be honest, some questions are badly formulated, and doing some SEO isn't so bad.

New contributor
anton_rh is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
2

0

Browse other questions tagged .