Robadob / sdl_exp

Low-level graphics engine built over SDL2
MIT License
1 stars 2 forks source link

std::vector<const T> is forbidden by C++ spec #40

Open ptheywood opened 7 years ago

ptheywood commented 7 years ago

<xmemory.h>

static_assert(!is_const<_Ty>::value,
        "The C++ Standard forbids containers of const elements "
        "because allocator<const T> is ill-formed.");

i.e std::vector<const std::string> is invalid.

Robadob commented 7 years ago

This only effects g++ and VC++2015+.

Fix it if you want, but I won't get round to it till I make the full switch to VS2015, which isn't something I plan on currently.