Skip to content

functional.h 类模板 identity 实现模板参数错误? #141

@LiuYuan-SHU

Description

@LiuYuan-SHU

请看代码, 此处实例化是否应当为:

template <class T> struct identity : public unarg_function<T, T> {
  const T &operator()(const T &x) const { return x; }
};

即将父类模板的第二个模板参数实例化为T而非bool

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