Home
Blogs
Questions
Jobs
Monetize

Home

About Us

Blogs

Questions

Jobs

Monetize

Post Job

banner

Questions about stdany

Read more about stdany

python (12.9k questions)

javascript (9.2k questions)

reactjs (4.7k questions)

java (4.2k questions)

java (4.2k questions)

c# (3.5k questions)

c# (3.5k questions)

html (3.3k questions)

Questions - stdany

binary comparison not defined when using map<any,any>

I was looking for a way to have a string[] as a map value, and I found this Stack Overflow question. I attempted to use the std::any type to solve my problem, and I got the error binary '<': 'cons...
test-img

greatusername

c++

stdmap

stdany

Votes: 0

Answers: 1

Latest Answer

std::map by default requires that the key type be comparable with <. std::any does not define any operator< and can therefore not be used as key in the map by default. If you really want to use ...
test-img

user17732522

Posts

Questions

Blogs

Jobs

The ultimate platform for coders and IT specialists

About

  • Company
  • Support

  • Platform

  • Terms & Conditions
  • Privacy statement
  • Cookie policy
  • Cookie option
  • OnlyCoders © 2025  |  All rights reserved