Skip to content

Commit

Permalink
Remove string_view overloads of parse
Browse files Browse the repository at this point in the history
* They were rejected by the LWG
  • Loading branch information
HowardHinnant committed Jul 26, 2021
1 parent fb2554a commit 383214d
Showing 1 changed file with 0 additions and 51 deletions.
51 changes: 0 additions & 51 deletions include/date/date.h
Original file line number Diff line number Diff line change
Expand Up @@ -8198,57 +8198,6 @@ parse(const CharT* format, Parsable& tp,
return {format, tp, &abbrev, &offset};
}

#if HAS_STRING_VIEW

// basic_string_view formats

template <class Parsable, class CharT, class Traits>
inline
auto
parse(std::basic_string_view<CharT, Traits> format, Parsable& tp)
-> decltype(date::from_stream(std::declval<std::basic_istream<CharT, Traits>&>(), format.data(), tp),
parse_manip<Parsable, CharT, Traits>{format, tp})
{
return {format, tp};
}

template <class Parsable, class CharT, class Traits, class Alloc>
inline
auto
parse(std::basic_string_view<CharT, Traits> format,
Parsable& tp, std::basic_string<CharT, Traits, Alloc>& abbrev)
-> decltype(date::from_stream(std::declval<std::basic_istream<CharT, Traits>&>(), format.data(),
tp, &abbrev),
parse_manip<Parsable, CharT, Traits, Alloc>{format, tp, &abbrev})
{
return {format, tp, &abbrev};
}

template <class Parsable, class CharT, class Traits>
inline
auto
parse(std::basic_string_view<CharT, Traits> format, Parsable& tp, std::chrono::minutes& offset)
-> decltype(date::from_stream(std::declval<std::basic_istream<CharT, Traits>&>(), format.data(),
tp, std::declval<std::basic_string<CharT, Traits>*>(), &offset),
parse_manip<Parsable, CharT, Traits>{format, tp, nullptr, &offset})
{
return {format, tp, nullptr, &offset};
}

template <class Parsable, class CharT, class Traits, class Alloc>
inline
auto
parse(std::basic_string_view<CharT, Traits> format, Parsable& tp,
std::basic_string<CharT, Traits, Alloc>& abbrev, std::chrono::minutes& offset)
-> decltype(date::from_stream(std::declval<std::basic_istream<CharT, Traits>&>(), format.data(),
tp, &abbrev, &offset),
parse_manip<Parsable, CharT, Traits, Alloc>{format, tp, &abbrev, &offset})
{
return {format, tp, &abbrev, &offset};
}

#endif // HAS_STRING_VIEW

// duration streaming

template <class CharT, class Traits, class Rep, class Period>
Expand Down

0 comments on commit 383214d

Please sign in to comment.