Skip to content

Commit

Permalink
Minor build fix:
Browse files Browse the repository at this point in the history
* gcc 10 build fails referencing static_rank field.
* Change minimum gcc version to g++-10

These should help with #63

PiperOrigin-RevId: 489580988
Change-Id: I603f0aa94da7d2789220621c713911f838dbf6b3
  • Loading branch information
laramiel authored and copybara-github committed Nov 18, 2022
1 parent c182e10 commit 93b5a63
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ Build dependencies
TensorStore is written in C++ and is compatible with the following C++
compilers:

- GCC 9 or later (Linux)
- GCC 10 or later (Linux)
- Clang 8 or later (Linux)
- Microsoft Visual Studio 2019 version 16.10 (MSVC 14.29.30037) or later
- Clang-cl 9 or later (Windows)
Expand Down
4 changes: 2 additions & 2 deletions tensorstore/box.h
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,10 @@ class Box : public internal_box::BoxStorage<Rank> {
public:
/// Compile-time rank, or `dynamic_rank` if the rank is specified at run time.
constexpr static DimensionIndex static_rank =
RankConstraint::FromInlineRank(Rank);
(Rank < 0) ? dynamic_rank : Rank;

/// Type that represents the static or dynamic rank.
using RankType = StaticOrDynamicRank<static_rank>;
using RankType = StaticOrDynamicRank<Rank>;

/// Constructs a rank-0 box (if `static_rank == dynamic_rank`), or otherwise
/// an unbounded box of rank `static_rank`.
Expand Down

0 comments on commit 93b5a63

Please sign in to comment.