My case is this answer I gave here: static_cast not working on precedence as expected

My initial answer was admittedly very bad, and also my first edit. This lead my question to -4. However, I think with my second edit I reached a reasonable point, in any case original within the context of other answers. I got another vote down, a negative comment (to which I replied) and then the answer was deleted by some (3) high-reputation users.

May I ask your opinion on this matter?

  • 1
    The answer was not deleted by any moderators; it was deleted by three regular users - deleted by GManNickG, DeadMG, marc_s 2 hours ago Moderators will always have a ♦ next to their names. – Doorknob Jun 27 '13 at 23:22
  • @Doorknob Yeah, sorry for the mistake, I had understood but somehow I wrote it wrong, I have edited my question – Antonio Jun 27 '13 at 23:26

Compare the highest voted answer:

You would think that the compiler, when resolving overloaded function templates, tries to figure out which of the templates matches the given arguments better. Based on that assumption, a template with a uint8_t should match a function call with a uint8_t argument better than a template for int.

But that's not how template overload resolution works. [detailed analysis follows, citing the language standard with explanations]

with yours:

There have been many efforts here (also through other similar questions) to understand, almost to justify why this happens, and it might be that the standard specifically say that this is the correct behaviour (but in a very tangled way).

My opinion is that [general description of problem follows, but no solution to OP's problem is offered]

The highest voted answer is... Well, it's an answer, and a very good, detailed one at that. Your "answer" reads more like a conversation. Many users who come from forum environments see this kind of conversation happen all the time, so while it might seem like a natural thing to do, we try to avoid that here.

Answers should be answers.

| improve this answer | |
  • Thanks, I understand the point. However, I read and reread the good answer, and I cannot understand it. Details are admittedly missing. What I would like to argue is that in the standard specification this subject is obscure, and the only reason why it is so is that they forgot to discuss it. Nothing wrong with that, but saying that in the standard this behaviour of the compiler can be logically deduced is an exercise for acrobats. My point is that the OP abstraction is correct, but yet it is not supported by the language. How can I express that? – Antonio Jun 27 '13 at 23:49
  • In a comment, not an answer. You have sufficient reputation to write comments on any post. If you want to write an answer, you must attempt to solve the OP's problem, not engage in extended dialogue over how obscure the specification is. That may be true, but it doesn't really help the OP solve his problem, does it? One of the reasons we have experts here is to help parse these obscure specifications for us. – user102937 Jun 27 '13 at 23:50
  • Actually, I see more obscure the essay of explaining the specification :) Anyway thanks. Is there any sensible forum where I could post the question "Why did the standard committee decide not to support this specific way of specializing templates?"? – Antonio Jun 27 '13 at 23:55
  • @Antonio: If you can make your question clear and specific, with examples of why you think that specific way of specializing templates would work, it's probably on-topic on Stack Overflow. Put the [language-lawyer] tag on it. :) – user102937 Jun 27 '13 at 23:57
  • The only remaining meta tag. – George Stocker Jun 28 '13 at 1:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .