Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"ambiguous overload" when assigning to std::string #13

Open
Spongman opened this issue Oct 28, 2020 · 0 comments
Open

"ambiguous overload" when assigning to std::string #13

Spongman opened this issue Oct 28, 2020 · 0 comments

Comments

@Spongman
Copy link

https://godbolt.org/z/88MK6z

#define AK_TOOLKIT_CONFIG_USING_STRING_VIEW 4
//#define AK_TOOLKIT_CONFIG_USING_STRING

#include <static_string.hpp>

namespace sstring = ak_toolkit::static_str;

int Foo()
{
    constexpr auto foo = sstring::literal("foo");
    std::string str1 = foo;
    std::string str2;
    str2 = foo;  // <<--- error: ambiguous overload for 'operator='
}
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

No branches or pull requests

1 participant