lundi 13 mars 2017

C++ compilability testing

Is there any method/library/framework/tool to check some C++ code for compilability (in the automated manner if possible)? For example I want to check if some class's constructor is marked as explicit:

struct Foo
{

    explicit Foo(int)
    {
    }

};

// ...

Foo f1{1};  // compiles
Foo f2 = 1; // doesn't compile

Compilability tests should be something like unit tests but instead of execution checks they should consist of compilability checks.

Aucun commentaire:

Enregistrer un commentaire