Skip to content

Internal inconsistency: scope for class std::hash<...> not found! #11538

@SunBlack

Description

@SunBlack

Describe the bug

We have code with following pattern multiple times in our code:

#pragma once

#include <functional>

namespace NyNamespace
{

struct MyClass
{
    size_t value;
};

}

template <>
struct std::hash<NyNamespace::MyClass>
{
    using Key = NyNamespace::MyClass;
    using result_type = size_t;

    inline result_type operator()(const Key& s) const
    {
        return std::hash<size_t>()(s.value);
    }
};

This leads to:

Internal inconsistency: scope for class std::hash< NyNamespace::MyClass > not found!

To Reproduce

Generate documentation with above example.

Expected behavior

No warning is raised, as extending the namespace std is not allowed, therefore no other scope is allowed.

Version
1.13.2 build from source on Ubuntu 22.04

Metadata

Metadata

Assignees

No one assigned

    Labels

    C/C++enhancementa request to enhance doxygen, not a bug

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions