I'd like to get the same behaviour as cpp:

```
enum dxgi_format_gli
{
    DXGI_FORMAT_R64_UINT_GLI = 1,
    DXGI_FORMAT_R64_SINT_GLI
}

```

where `DXGI_FORMAT_R64_UINT_GLI` gets 1 and the next gets 2

the closest I got is:

```
private var counter: Int = 2;

enum class dxgi_format_gli(i: Int = counter++) {

    DXGI_FORMAT_R64_UINT_GLI(1),
    DXGI_FORMAT_R64_SINT_GLI()
}

```

However I'd like it, of course, to be dynamic, that is whenever I call the constructor with a parameter, save that one in `counter` and all the following constructors increment and get it..

I already made it in java:

```
public enum Dxgi_format_gli {

    DXGI_FORMAT_R64_UINT_GLI(1),
    DXGI_FORMAT_R64_SINT_GLI;

    public final int value;

    private static class Counter {

        private static short value = 0;
    }

    private Dxgi_format_gli() {
        value = Counter.value;
        Counter.value++;
    }

    private Dxgi_format_gli(int value) {
        this.value = value;
        Counter.value++;
    }
}

```

But I didn't make it using Kotlin..