stripedhyena-nous-7b· Together AI
Arena Human Preference 55K
What to do if template specialization is itself templated? Like "template <typename T>;…
- User
What to do if template specialization is itself templated? Like "template ; void foo(); template ; void foo<vector>". Should I put it in header or source file?
- Assistant
You should put specializations of a template into the header file where the template is defined, and only provide the definition of the template itself in the header file. The specialization should be placed in the source file to prevent accidental activation of the specialization.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.