Skip to content

[BUG] __FUNCTION__ used in templated function is not returning the same string than MSVC #33

@gmh5225

Description

@gmh5225
#include <iostream>

template <class T>
class TestClass
{
public:
    TestClass()
    {
        /*
        function: TestClass<class UnitTestNative>::TestClass
        func: TestClass
        */
        std::cout << "function: " << __FUNCTION__ << std::endl;
        std::cout << "func: " << __func__ << std::endl;
    }
    void haha2()
    {
        std::cout << "function: " << __FUNCTION__ << std::endl;
        std::cout << "func: " << __func__ << std::endl;
    }
};

class UnitTestNative
{
};


int
main()
{
    TestClass<UnitTestNative> t;
    t.haha2();
    return 0;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions