Skip to content

Conversation

@vitaut
Copy link
Contributor

@vitaut vitaut commented Oct 5, 2019

I agree that my contributions are licensed under the {fmt} license, and agree to future changes to the licensing.

@vitaut vitaut merged commit 0c76503 into master Oct 5, 2019
@vitaut vitaut deleted the string-view branch October 5, 2019 13:58
@denizevrenci
Copy link
Contributor

Should there also be a guard to check that std::string_view cannot be constructed from the type at this overload?

  template <typename T,
            FMT_ENABLE_IF(!is_string<T>::value && !is_char<T>::value &&
                          !std::is_constructible<basic_string_view<char_type>,
                                                 T>::value &&
                          (has_formatter<T, Context>::value ||
                           has_fallback_formatter<T, Context>::value))>
  FMT_CONSTEXPR const T& map(const T& val) {
    return val;
  }

As it stands, a strong type that wraps a std::string_view has ambiguous overloads between the newly added overload and the one above.

@vitaut
Copy link
Contributor Author

vitaut commented Dec 4, 2019

@denizevrenci probably yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants