Skip to content

Fail to build core/meta/src/TEnumConstant.cxx in gcc 11. Need to include <limits> in header file core/foundation/inc/ROOT/libcpp_string_view.h #8513

@yuxianch

Description

@yuxianch

In gcc 11, core/meta/src/TEnumConstant.cxx cannot be built.
Error message:

/tmp/root-6.22.06/core/foundation/inc/ROOT/libcpp_string_view.h:275:63: error: ‘numeric_limits’ is not a member of ‘std’
  275 |         size_type max_size() const _NOEXCEPT { return (_VSTD::numeric_limits<size_type>::max)(); }
      |                                                               ^~~~~~~~~~~~~~

This is because is not explicitly included by core/foundation/inc/ROOT/libcpp_string_view.h. It can be built if the header is included.

#include <string>
#include <algorithm>
#include <iterator>
#include <ostream>
#include <iomanip>
#include <stdexcept>

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions