I have:
#include
#include
using namespace std;
int main()
{
auto a = -SOME_CONST_MAX;
vector myVec {a, a,
If I remember correctly, proposals have been made for vector syntax. They where not accepted by the C++ standard committee.
C++17 will introduce something like std::vector bob = {a,a,a,a}; that just works. Note the lack of . This may just be the language feature, with actual use in std following afterward.
auto is also added to templates, but auto is always a value never a type. So using auto to replace a type was considered a bad idea.
Here is a use of auto in a template:
template
using constant_t=std::integral_constant;
template
constexpr constant_t constant{};
and now constant<7> is a std::integral_constant. This is considered useful for many reasons.
The answer to your practical problem using current C++ is:
auto a = -SOME_CONST_MAX;
std::vector myVec {a, a, a, a};
where we deduce the type of a and pass it to vector.