consolidate all repos to one for archive

This commit is contained in:
2025-01-28 13:46:42 +01:00
commit a6610fbc7a
5350 changed files with 2705721 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
#include <iostream>
void f(int) {
std::cout << "Calling function f(int)" << std::endl;
}
void f(double) {
std::cout << "Calling function f(double)" << std::endl;
}
void f(char*) {
std::cout << "Calling function f(char*)" << std::endl;
}
/*
template <typename T>
void f(T) {
std::cout << "Calling function that is instantiated from template" << std::endl;
}
*/
void f(int, double) {
std::cout << "Calling function f(int, double)" << std::endl;
}
void f(double, double) {
std::cout << "Calling function f(double, double)" << std::endl;
}
/*
void f(double, int) {
std::cout << "Calling function f(double, int)" << std::endl;
}
*/
int main() {
f('a'); // f(int) numeric promotion
f(0); // f(int) exact match
//long a=5L;
//f(a); //ambiguous, long to int, and long to double are standard conversions
//f(double(a)); // ambiguity is resolved by explicit conversion
// 1. parameter {f1} 2.parameter {f1, f2}: {f1} intersection {f1, f2} = {f1}
f('a', 1); // f(int, double)
return 0;
}