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

Class template argument deduction not working - cpp17 #596

Closed
amutamil opened this issue Dec 4, 2023 · 2 comments
Closed

Class template argument deduction not working - cpp17 #596

amutamil opened this issue Dec 4, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@amutamil
Copy link

amutamil commented Dec 4, 2023

#include <iostream>
#include <vector>

template<typename T>
class Data {
public:
	Data(const T &t) {
	}
};
Data(const char *) -> Data<std::string> ;
Data(int)->Data<long> ;
int main() {
	Data d1{5};
}

the above code is not compiling, only if I change Data d1{5} ; to Data<int> d1{5} ; it is working.

@denis-gerasimov
Copy link

Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
Segmentation fault (core dumped)

@andreasfertig
Copy link
Owner

Hello @amutamil,

thanks for reporting this issue. A fix is on its way.

Andreas

@andreasfertig andreasfertig added the bug Something isn't working label Dec 6, 2023
andreasfertig added a commit that referenced this issue Dec 6, 2023
Fixed #596: Support for deduction guides without a template head.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants