aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/_posts/snippets/static_vs_inline_vs_unnamed_namespaces/static/shared.hpp
blob: 647f49e64fbddbe184a39aee7006af0f0340be62 (plain) (blame)
1
2
3
4
5
6
#pragma once

static int shared() {
    static int n = 0;
    return ++n;
}