Fixes ES.50 example and closes #1682

Also removes the only use of `decltype` in the Guidelines, FTW.
This commit is contained in:
hsutter 2020-10-01 11:30:30 -07:00
parent 55bea2089b
commit 6ad29ce609

View File

@ -11806,7 +11806,7 @@ Instead, prefer to put the common code in a common helper function -- and make i
Bar my_bar;
template<class T> // good, deduces whether T is const or non-const
static auto get_bar_impl(T& t) -> decltype(t.get_bar())
static auto& get_bar_impl(T& t)
{ /* the complex logic around getting a possibly-const reference to my_bar */ }
};