Closed Finii closed 10 months ago
I guess just a remove_cv_t
is missing @alt-graph
A std::vector
cannot contain const
items:
/opt/wandbox/gcc-13.2.0/include/c++/13.2.0/bits/stl_vector.h: In instantiation of 'class std::vector<const int>':
prog.cc:10:28: required from here
/opt/wandbox/gcc-13.2.0/include/c++/13.2.0/bits/stl_vector.h:437:66: error: static assertion failed: std::vector must have a non-const, non-volatile value_type
... so I think our SmallVector
should follow suit. But maybe we should add a nice static_assert like above?
Waahhh :sob:
Man darf nie vernuenftige Sprachen benutzen und dann wieder zu C++ wechseln
Yes, would be nice, maybe. I would close this Issue now. Sigh.
What I wanted to have was a SmallVector<std::string const&, n>
but that is already impossible because it can not work with refs. Passing multiple strings in a lightweight manner seems ... hard. Now I use gul::string_view
, but THAT is missing all the nice conversion ops :unamused: I want to use std::string_view
; I really hate this gul thing in c++17 code.