Quantcast
Channel: Bartek's coding blog
Viewing all articles
Browse latest Browse all 325

How To Detect Function Overloads in C++17, std::from_chars Example

$
0
0

Detect Function Overload, C++17

The problem: a library function offers several overloads, but depending on the implementation/compiler, some of the overloads are not available. How to check the existence of an overload? And how to provide a safe fallback?

In this article, I’ll show you a background “theory” and one case - std::from_chars that exposes full support for numbers or only integer support (in GCC, Clang).

Read more...

Viewing all articles
Browse latest Browse all 325

Trending Articles