Displaying 3 results from an estimated 3 matches for "empalce_back".
2016 Dec 29
0
[cfe-dev] Modernizing LLVM Coding Style Guide and enforcing Clang-tidy
...e_back, if you are converting from one type to another and the
> conversion fails, you again get template backtraces. With push_back, all
> the conversions happen before the push_back method and so the error is
> local to your code.
>
This in turn makes me prefer push_back(T(...)) over empalce_back(...). I
*like* the constructor being called explicitly in the users code if is an
*explicit* constructor. For things that should be implicit, they already
are with push_back. If the API of the type went out of its way to make a
constructor call explicit, I'd like to see the user code actually c...
2016 Dec 30
2
[cfe-dev] Modernizing LLVM Coding Style Guide and enforcing Clang-tidy
...ting from one type to another and the
>> conversion fails, you again get template backtraces. With push_back, all
>> the conversions happen before the push_back method and so the error is
>> local to your code.
>>
>
> This in turn makes me prefer push_back(T(...)) over empalce_back(...). I
> *like* the constructor being called explicitly in the users code if is an
> *explicit* constructor. For things that should be implicit, they already
> are with push_back. If the API of the type went out of its way to make a
> constructor call explicit, I'd like to see the...
2016 Dec 29
2
[cfe-dev] Modernizing LLVM Coding Style Guide and enforcing Clang-tidy
Somewhat unfortunately, we have two discussions here:
- Clang-tidy has checks that might improve code -- should we deploy them?
If so which?
I'll address this in a separate email, and focus this one on:
- Should we have coding standards around 'push_back' and 'emplace_back',
and if so, what should they say?
I think the amount of confusion makes a coding standard useful.
As