benchmark icon indicating copy to clipboard operation
benchmark copied to clipboard

[BUG] Compilation failed for using operator [] for unordered_map

Open apachaihop opened this issue 7 months ago • 1 comments

Describe the bug Compilation failed for using operator [] for unordered_map with clang 17 + stdlibc++ 14

System Which OS, compiler, and compiler version are you using:

  • OS: Arch
  • Compiler and version: clang 17.0.6

To reproduce Steps to reproduce the behavior: https://godbolt.org/z/1sz1hdEsh

Expected behavior Inserting element at unordered_map without CE

Additional context https://github.com/google/benchmark/blob/c2146397ac69e6589a50f6b4fc6a7355669caed5/include/benchmark/benchmark.h#L864C2-L868C4 change here and https://github.com/google/benchmark/blob/c2146397ac69e6589a50f6b4fc6a7355669caed5/include/benchmark/benchmark.h#L896C3-L900C4 here to insert method with std::make_pair to better cross compilation possibilities and fixing CE

apachaihop avatar Jun 29 '24 06:06 apachaihop