C++ Logo


Advanced search

Subject: [std-proposals] The new new thing
From: Matt Hurd (matthurd_at_[hidden])
Date: 2020-02-20 18:21:40

using my_typedifferent_int_t = int64_t is a little disappointing. No type
safety by design which is excellent mostly.

How about:

using new qty_t = int64_t;
using new px_t = int64_t;

auto bid = qty_t{100};

auto ask = px_t{200};

auto err0 = bid + ask; // does not compute

& extensions without inheritance for reuse?

template<typename T>

struct bah_humbug_vector2 : new std::vector<T>{

  constexpr auto ssize() const noexcept ->

    assert( size() <= std::numeric_limits<size_type>::max );

    return static_cast<std::make_signed_t<decltype(size())>>(size());



It would simplify a lot of my life and bring some facilities to C++ other
languages support.

< $0.02


STD-PROPOSALS list run by herb.sutter at gmail.com

Standard Proposals Archives on Google Groups