C++ Logo

SG10

Advanced search

Subject: Re: [isocpp-core] Feature-test macro for ADL calls with template arguments?
From: Gabriel Dos Reis (gdr_at_[hidden])
Date: 2020-06-15 12:32:50



| -----Original Message-----
| From: Ville Voutilainen <ville.voutilainen_at_[hidden]>
| Sent: Monday, June 15, 2020 9:59 AM
| To: Gabriel Dos Reis <gdr_at_[hidden]>
| Cc: core_at_[hidden]; Barry Revzin <barry.revzin_at_[hidden]>; Marek
| Polacek <polacek_at_[hidden]>; sg10_at_[hidden]
| Subject: Re: [isocpp-core] [SG10] Feature-test macro for ADL calls with
| template arguments?
|
| On Mon, 15 Jun 2020 at 19:47, Gabriel Dos Reis <gdr_at_[hidden]>
| wrote:
| > | I don't have a shade of illusion of portability here; it's all about
| > | selectively enabling superior
| > | functionality when it's available, and it's not yet available
| > | ubiquitously. Early adopters can adopt
| > | early, without waiting for everything to synchronize into a brave new
| world.
| >
| > As a user depending on that superior functionality, how do I use it in
| practice when I am compiling with two different compilers with differing
| levels of support? Or, I am not supposed to see any difference?
|
| That depends on the API/implementation choice of the library. There's
| three options:
|
| 1) provide the full API everywhere with one implementation
| 2) provide the full API everywhere with two implementations, with the
| intent to get rid of the pre-C++17 implementation
| eventually
| 3) provide the full API for C++17 only, so as to keep its
| implementation clean of pre-C++17 work-arounds
|
| The macro enables (2) and (3). Option (1) can be done even without the
| macro.

I sounds to me as if option (2) falls under `portability across compilers pre- and post-C++17'
and
    # [...] it has to be rewritten according to the conventions of each environment.

even if said duplication would eventually go away?

-- Gaby


SG10 list run by sg10-owner@lists.isocpp.org