user3402564
user3402564

Reputation: 1

Qt MOC error for namespace like FOO::BAR

I've got a namespace like

namespace FOO::BAR {
    [..] myNameSpaceContent [..]
}

The MOC compiler spots an error on the first ligne. This error disappears when I put :

namespace FOO {
    namespace BAR {
        [..] myNameSpaceContent [..]
    }
}

Do you happen to know how I can solve that MOC problem ?

Upvotes: 0

Views: 402

Answers (1)

Sebastian Mach
Sebastian Mach

Reputation: 39109

It is not a MOC problem, but rather a C++ issue;

namespace FOO::BAR {

is not valid syntax prior to C++17, unfortunately. Only

namespace FOO { namespace BAR {

is okay.

Upvotes: 2

Related Questions