C++ increment with macro

I have the following code and I want to use increment with macro:

#include <iostream>

#define ABS(x) ((x) < 0 ? -(x) : (x))

int main(int argc, char** argv)
    int x = 5;
    const int result = ABS(x++);

    std::cout << "R: " << result << std::endl;
    std::cout << "X: " << x << std::endl;

    return EXIT_SUCCESS;

But output will be incorrect:

R: 6
X: 7

Is it possible to somehow use macros with an increment, or should this be abandoned altogether?

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum