Language: C++

#include <bits/stdc++.h>
using namespace std;

template<class t>
bool chmax(t& a, const t& b) {
    if (a < b) { a = b; return true; }
    return false;
}
template<class t>
bool chmin(t& a, const t& b) {
    if (b < a) { a = b; return true; }
    return false;
}

// std::vector declaration
template<typename t>
vector<t> make_v(size_t a) { return vector<t>(a); }
template<typename t, typename... ts>
auto make_v(size_t a, ts... ts) {
    return vector<decltype(make_v<t>(ts...))>(a, make_v<t>(ts...));
}

// std::vector declaration and initialization
template<typename t>
vector<t> make_vector(size_t a, t x) { return vector<t>(a, x); }
template<typename t, typename u, typename... ts>
auto make_vector(size_t a, u b, ts... ts) {
    return vector<decltype(make_vector<t>(b,ts...))>(a, make_vector<t>(b, ts...));
}

// std::vector input
template<typename t>
istream& operator>>(istream& is, vector<t>& v) {
    for (auto &e : v) is >> e;
    return is;
}

// std::vector debug
template<typename t>
ostream& operator<<(ostream& os, const vector<t>& v) {
    os << "[";
    bool a = 1;
    for (auto e : v) {
        os << (a ? "" : " ");
        os << e;
        a = 0;
    }
    os << "]";
    return os;
}

// std::array debug
template<typename t, size_t n>
ostream& operator<<(ostream& os, const array<t, n>& v) {
    os << "[";
    bool a = 1;
    for (auto e : v) {
        os << (a ? "" : " ");
        os << e;
        a = 0;
    }
    os << "]";
    return os;
}

// std::deque debug
template<typename t>
ostream& operator<<(ostream& os, const deque<t>& d) {
    os << "[";
    bool a = 1;
    for (auto e : d) {
        os << (a ? "" : " ");
        os << e;
        a = 0;
    }
    os << "]";
    return os;
}

// std::pair debug
template<typename t, typename u>
ostream& operator<<(ostream& os, const pair<t, u>& p) {
    os << "(" << p.first << " " << p.second << ")";
    return os;
}

// std::set debug
template<typename t>
ostream& operator<<(ostream& os, const set<t>& st) {
    os << "{";
    bool a = 1;
    for (auto e : st) {
        os << (a ? "" : " ");
        os << e;
        a = 0;
    }
    os << "}";
    return os;
}

// std::multiset debug
template<typename t>
ostream& operator<<(ostream& os, const multiset<t>& st) {
    os << "{";
    bool a = 1;
    for (auto e : st) {
        os << (a ? "" : " ");
        os << e;
        a = 0;
    }
    os << "}";
    return os;
}

// std::map debug
template<typename t, typename u>
ostream& operator<<(ostream& os, const map<t, u>& mp) {
    os << "{";
    bool a = 1;
    for (auto e : mp) {
        os << (a ? "" : " ");
        os << e.first << ":" << e.second;
        a = 0;
    }
    os << "}";
    return os;
}

// std::tuple debug
template<int n, class tuple>
void out(ostream& os, const tuple& t){}
template<int n, class tuple, class h, class ...ts>
void out(ostream& os, const tuple& t) {
    if (n) os << " ";
    os << get<n>(t);
    out<n+1,tuple,ts...>(os, t);
}
template<class ...ts>
ostream& operator<<(ostream& os, const tuple<ts...>& t) {
    os << "(";
    out<0,tuple<ts...>,ts...>(os, t);
    os << ")";
    return os;
}

// debug
#define dump(x) cerr<<#x<<" = "<<(x)<<endl

// weighted edge
template<typename t>
struct edge {
    int src, to;
    t cost;

    edge(int to, t cost) : src(-1), to(to), cost(cost) {}
    edge(int src, int to, t cost) : src(src), to(to), cost(cost) {}

    friend ostream& operator<<(ostream& os, const edge& e) {
        return os << "(" << e.src << "->" << e.to << ":" << e.cost << ")";
    }
};

using ll = long long;

#define fs first
#define sc second

const ll mod = 1e9+7;


int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(10);

    ll h; cin >> h;

    ll ans = 0;
    ll tmp = 1;
    while (h > 0) {
        ans += tmp;
        h >>= 1;
        tmp <<= 1;
    }

    cout << ans << endl;

    return 0;
}


Compiler output:
a.cc:19:25: error: declaration of 'ts ... ts' shadows template parameter
   19 | auto make_v(size_t a, ts... ts) {
      |                       ~~^~~~~~
a.cc:18:22: note: template parameter 'ts' declared here
   18 | template<typename t, typename... ts>
      |                      ^~~~~~~~
a.cc: In function 'auto make_v(size_t, ts ...)':
a.cc:19:25: error: declaration of 'ts ... ts' shadows template parameter
   19 | auto make_v(size_t a, ts... ts) {
      |                       ~~^~~~~~
a.cc:18:22: note: template parameter 'ts' declared here
   18 | template<typename t, typename... ts>
      |                      ^~~~~~~~
a.cc: At global scope:
a.cc:27:35: error: declaration of 'ts ... ts' shadows template parameter
   27 | auto make_vector(size_t a, u b, ts... ts) {
      |                                 ~~^~~~~~
a.cc:26:34: note: template parameter 'ts' declared here
   26 | template<typename t, typename u, typename... ts>
      |                                  ^~~~~~~~
a.cc: In function 'auto make_vector(size_t, u, ts ...)':
a.cc:27:35: error: declaration of 'ts ... ts' shadows template parameter
   27 | auto make_vector(size_t a, u b, ts... ts) {
      |                                 ~~^~~~~~
a.cc:26:34: note: template parameter 'ts' declared here
   26 | template<typename t, typename u, typename... ts>
      |                                  ^~~~~~~~