samedi 25 février 2017

std::is_convertible

First of all, I'm sorry that I don't have a mcve, though, I don't manage to reduce the code without this answer. (And can't run creduce)

My current code is similar to the following:

#include <type_traits>

namespace NS
{
    class C final
        {
        // ...
        };
    static_assert(std::is_convertible<C, C>::value, "Strange bug?");
}

This piece of code is included in over 10 000 different cpp files which get compiled with almost the same command line arguments. (Only differences are in define related to declspec(dllimport/dllexport) and the cpp/obj files)

Every of these cpp files can compile, except for 1, on which the static_assert fails if I try to compile it with clang-cl (Using version 4.0.0 RC2), the code however does compile with MSVC2015.

As I'm out of options hunting down the problem, I would like to know which external factors can influence this static assert, so I can start searching the preprocessed file for them.

Tnx in advance, JVApen

Aucun commentaire:

Enregistrer un commentaire