Solved: 35 - Auto Return
This commit is contained in:
@@ -6,9 +6,7 @@
|
|||||||
namespace cpp14 {
|
namespace cpp14 {
|
||||||
|
|
||||||
[[nodiscard]] inline auto copy_or_reference(const std::vector<int>& input) -> decltype(auto) {
|
[[nodiscard]] inline auto copy_or_reference(const std::vector<int>& input) -> decltype(auto) {
|
||||||
(void)input;
|
return input;
|
||||||
static std::vector<int> empty;
|
|
||||||
return empty;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] inline auto identity(int value) -> decltype(auto) { return value; }
|
[[nodiscard]] inline auto identity(int value) -> decltype(auto) { return value; }
|
||||||
|
|||||||
Reference in New Issue
Block a user