remove unnecessary `<T>` from `valarray`. #345

Closed
wants to merge 4 commits into
from

Projects

None yet

4 participants

@faithandbrave
Contributor

add <T> of return type for consistency.

@faithandbrave faithandbrave changed the title from fix missing `<T>` to `valarray::operator=(initializer_list<T>)` to fix missing <T> to valarray::operator=(initializer_list<T>) Jul 23, 2014
@jwakely
Member
jwakely commented Jul 23, 2014

My preference is to remove redundant template argument lists, it makes the code much easier to read, see e.g. ced4bbd

@faithandbrave
Contributor

OK, I'll fix this pull request.

@jwakely
Member
jwakely commented Jul 23, 2014

It might be worth waiting to see what @zygoloid and others think

@zygoloid
Contributor

My preference is to leave out the template argument lists whenever naming the injected-class-name. Listing them explicitly makes the reader wonder whether they're somehow different.

@faithandbrave
Contributor

I confirmed consensus. I'll remove <T>.

@faithandbrave
Contributor

I re-pull requested. Please check the change.

@faithandbrave faithandbrave changed the title from fix missing <T> to valarray::operator=(initializer_list<T>) to remove unnecessary `<T>` from `valarray`. Jul 31, 2014
@Quuxplusone Quuxplusone and 1 other commented on an outdated diff Jan 7, 2015
source/numerics.tex
@@ -6885,7 +6885,7 @@
\indexlibrary{\idxcode{operator=}!\idxcode{valarray}}%
\indexlibrary{\idxcode{valarray}!\idxcode{operator=}}%
\begin{itemdecl}
-valarray& operator=(initializer_list<T> il);
+valarray<T>& operator=(initializer_list<T> il);
@Quuxplusone
Quuxplusone Jan 7, 2015 Contributor

This <T> should be removed (i.e., this line shouldn't be part of the diff).

@faithandbrave
faithandbrave Jan 7, 2015 Contributor

Thanks for your review. I removed the <T>.

@jwakely jwakely added a commit that closed this pull request Jan 7, 2015
@jwakely jwakely [template.valarray] Use injected-class-name in valarray.
Reported by Akira Takahashi. Fixes #345.
e1fffe9
@jwakely jwakely closed this in e1fffe9 Jan 7, 2015
@jwakely
Member
jwakely commented Jan 7, 2015

Thanks - I committed a squashed merge of your changes.

@faithandbrave
Contributor

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment