billyquith / ponder

C++ reflection library with Lua binding, and JSON and XML serialisation.
http://billyquith.github.io/ponder/
Other
645 stars 95 forks source link

missing a return statement in string_view.hpp at line 215 #106

Closed shierei closed 5 years ago

shierei commented 5 years ago

My compiler options turned on -we1011 and caught this one.

ponder/detail/string_view.hpp(215): error #1011: missing return statement at end of non-void function "ponder::detail::basic_string_view<CharT, Traits>::copy" }

size_type copy(CharT* dest, size_type count, size_type pos = 0) const
{
    if (pos >= size()) { throw std::out_of_range("basic_string_view::copy out of range"); }
    for (int i = 0; i < size();++i)
    {
        dest[i] = operator[](i + pos);
    }
}
billyquith commented 5 years ago

Fixed.