C++ @ custom annotation as Java or Python

  annotations, c++, java, rest, web-frameworks

It’s possible to create a custom annotation like @ or another character as Rust’s [#…] in C++?

Target would be something like:

#pragma once

#include "my_header.h"

@RestController(path = "/home")
void MyClass::some_method(int int_arg)
{
    // some C++ code
}

I’ve already been reading old similar questions to this, but like 7 or more years old from now.

There is a way to achieve this these days?

Regards

Source: Windows Questions C++

LEAVE A COMMENT