I considered that any solution had to violate the spirit of the standard. 

🤪 does this satisfy the letter of the standard?


#include <vector>
namespace PPP {
template <class t>
struct type { 
  inline static 
  constexpr bool value = true; 
template<class t>
concept win = type<t>::value;
template<PPP::win t, PPP::win a>
class std::vector<t, a> {
    void found_our_own() {}

On Mon, May 1, 2023 at 3:43 AM Jens Maurer <jens.maurer@gmx.net> wrote:

On 01/05/2023 08.37, Kirk Shoop via Ext wrote:
> This seems to work.
> https://wandbox.org/permlink/AxbjJtysQDG1AuaS <https://wandbox.org/permlink/AxbjJtysQDG1AuaS>
> Excerpt:
> #include <vector>
> template<class t>
> concept win = true;
> namespace std {
> template<win t, win a>
> class vector<t, a> {
>   public: 
>     void found_our_own() {}
> };
> }

[namespace.std] p2 says

"Unless explicitly prohibited, a program may add a template specialization for any standard library class
template to namespace std provided that (a) the added declaration depends on at least one program-defined
type and (b) the specialization meets the standard library requirements for the original template."

I'm not seeing your specialization to depend on a program-defined type;
a concept is not a type.