Java absolutely does have the ambiguous overload problem.
public class MyVector {
public MyVector(int... items) {
System.out.println(String.format("constructing a vector of %d items", items.length));
}
public MyVector(int start, int end) {
System.out.println(String.format("constructing a vector from the range [%d, %d)", start, end));
}
}
How do you construct a MyVector of two items?
In JavaScript, how do you use new Array(...) to create an array consisting of a single integer?
The reason these languages don't have the make_unique or emplace problems is because they don't have a concept of in-place construction at all, since objects in those languages are heap-allocated and have reference semantics anyway.
Java absolutely does have the ambiguous overload problem.
How do you construct a MyVector of two items?In JavaScript, how do you use new Array(...) to create an array consisting of a single integer?
The reason these languages don't have the make_unique or emplace problems is because they don't have a concept of in-place construction at all, since objects in those languages are heap-allocated and have reference semantics anyway.