Skip to content

Missing operator syntax higlighting for templated const T &() operator override #706

Description

@alphahex99

The code with a problem is:

template <typename T>
struct IComponent : public T
{
    IComponent () = default;

    IComponent (const T &value) : T(value)
    {
    }

    IComponent &operator=(const T &value)
    {
        static_cast<T &>(*this) = value;
        return *this;
    }

    operator T &()
    {
        return static_cast<T &>(*this);
    }

    operator const T &() const
    {
        return static_cast<const T &>(*this);
    }
};

It looks like:

Image

It should look like:

(edited with mspaint)

Image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions