abseil / abseil/abseil-cpp

[Bug]: variant index returns wrong value

Open
#1,525 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
18.1k
Forks
3.2k
Avg merge
20h 36m
Merged PRs (30d)
1

Description

### Describe the issue

variant index returns wrong value

### Steps to reproduce the problem

std::variant test_std = "test";
absl::variant test_absl = "test";
std::cout << test_std.index() << " <->" << test_absl.index(); // 0 <-> 1

### What version of Abseil are you using?

Current Chromium Code

### What operating system and version are you using?

Win 11

### What compiler and version are you using?

Current Chromium Code

### What build system are you using?

Current Chromium Code

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.