Couldn't you use std::conditional for the same purpose?
https://en.cppreference.com/w/cpp/types/conditional

On Wed, Jul 20, 2022 at 12:28 PM Frederick Virchanza Gotham via Std-Proposals <std-proposals@lists.isocpp.org> wrote:
Right now with C++20 we can use the preprocessor to select different
types, as follows:

          #define USE_DEBUGGING_CONTAINERS

          #ifdef USE_DEBUGGING_CONTAINERS
             using  __gnu_debug::vector;
          #else
             using std::vector;
          #endif

However it would be nice if we could use the ternary operator with
types in a few different contexts, for example:

          bool constexpr use_debugging_containers = true;

          using (use_debugging_containers ? __gnu_debug::vector : std::vector );

          typedef (use_debugging_containers ? __gnu_debug::vector<int>
: std::vector<int> ) IntVec;

The closest thing we have to this at the moment is a lot more complicated:

          bool constexpr use_debugging_containers = true;

          namespace Containers {

              template<bool x>
              class detail {
                  template<typename... Args>
                  using vector = std::vector<Args...>;
              };

              template<>
              class detail<true> {
                          template<typename... Args>
                          using vector = __gnu_debug::vector<Args...>;
              };

              template<typename... Args>
              using vector = detail<use_debugging_containers>::vector<Args...>;
          }

          using namespace Containers;

          int main(void)
          {
              vector<double> vec;
          }

Also I propose that the ternaries can be nested:

          typedef ( number > 65535u ? uint32_t : ( number > 255u ?
uint16_t : uint8_t ) ) IntT;
--
Std-Proposals mailing list
Std-Proposals@lists.isocpp.org
https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals