OpenEnroth 73e68f7
Loading...
Searching...
No Matches
Public Member Functions | List of all members
TransparentString Class Reference

#include <TransparentFunctors.h>

Inheritance diagram for TransparentString:

Public Member Functions

 TransparentString (std::string_view view)
 
 TransparentString (const std::string &s)
 
 TransparentString (std::string &&s)
 
 TransparentString (const TransparentString &)=default
 
 TransparentString (TransparentString &&)=default
 

Detailed Description

This one is needed for fully transparent maps, otherwise in pre-C++26 you'll get compilation errors in the following code:

std::map<std::string, int, TransparentStringLess> map = makeMap();
std::string_view key = "something";
map[key]++; // This won't compile.

This code will work though if you use TransparentString as your map's key.

Constructor & Destructor Documentation

◆ TransparentString() [1/5]

TransparentString::TransparentString ( std::string_view  view)
inline

◆ TransparentString() [2/5]

TransparentString::TransparentString ( const std::string &  s)
inline

◆ TransparentString() [3/5]

TransparentString::TransparentString ( std::string &&  s)
inline

◆ TransparentString() [4/5]

TransparentString::TransparentString ( const TransparentString )
default

◆ TransparentString() [5/5]

TransparentString::TransparentString ( TransparentString &&  )
default

The documentation for this class was generated from the following file: