Menu

incorrect cpp:3490 Use " = default" ..

2021-05-25
2021-05-27
  • Ronald Hedel

    Ronald Hedel - 2021-05-25

    enum class E
    {
    E1
    };

    class C
    {
    private:
    E m_E;
    public:
    explicit C(E const& e) noexcept : m_E{ e } {}
    auto getE() const noexcept->E { return m_E; }
    };

    template<e v="">
    class D : public C
    {
    public:
    D() noexcept : C(V) {};
    // cpp:3490 Use " = default" ... is INCORRECT
    };</e>

     

    Last edit: Ronald Hedel 2021-05-25
  • Daniel Marjamäki

    I fail to reproduce. Is there some flag I am missing..

    ./cppcheck --inconclusive --enable=style 1.cpp

     
  • Ronald Hedel

    Ronald Hedel - 2021-05-27

    detected by cppcheck add-in 1.4.2 in VisualStudio

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.