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

Не работает в MSVC17 operator == и operator != #1

Open
XRay3D opened this issue Apr 15, 2020 · 0 comments
Open

Не работает в MSVC17 operator == и operator != #1

XRay3D opened this issue Apr 15, 2020 · 0 comments

Comments

@XRay3D
Copy link

XRay3D commented Apr 15, 2020

main.cpp:82: ошибка: C2593: неоднозначный "operator =="
main.cpp:19: может быть
bool operator ==<int,double,char>(type_pack<int,double,char>,type_pack<int,double,char>)
main.cpp:17: или
bool operator ==<int,double,char,int,double,char>(type_pack<int,double,char>,type_pack<int,double,char>)
main.cpp:83: при попытке сопоставить список аргументов
(type_pack<int,double,char>, type_pack<int,double,char>)

Я решил так.
template <class... Ts, class... Us, class T = disable_if_t<std::is_same_v<Ts..., Us...>>>
constexpr bool operator==(type_pack<Ts...>, type_pack<Us...>) { return false; }
`

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