TartanLlama / optional

C++11/14/17 std::optional with functional-style extensions and reference support
https://tl.tartanllama.xyz
Creative Commons Zero v1.0 Universal
859 stars 67 forks source link

Add return #6

Closed basiliscos closed 6 years ago

basiliscos commented 6 years ago

clang 5.0 complains about missing return statement:

/home/b/development/android/projects/beetris/proj.cmake/../lib/tl/optional.hpp:376:69: warning: control reaches end of non-void function [-Wreturn-type]
  TL_OPTIONAL_11_CONSTEXPR T &&get() && { std::move(this->m_value); }
                                                                    ^
/home/b/development/android/projects/beetris/proj.cmake/../lib/tl/optional.hpp:360:48: note: in instantiation of member function 'tl::detail::optional_operations_base<TestCell>::get'
      requested here
        this->m_value = std::forward<Opt>(rhs).get();
                                               ^
/home/b/development/android/projects/beetris/proj.cmake/../lib/tl/optional.hpp:495:11: note: in instantiation of function template specialization
      'tl::detail::optional_operations_base<TestCell>::assign<tl::detail::optional_move_assign_base<TestCell, false> >' requested here
    this->assign(std::move(rhs));
          ^
/home/b/development/android/projects/beetris/proj.cmake/../lib/tl/optional.hpp:1186:47: note: in instantiation of member function 'tl::detail::optional_move_assign_base<TestCell,
      false>::operator=' requested here
  optional &operator=(optional &&rhs) = default;

The PR fixes that issue.