Quote Originally Posted by JohnW@Wessex View Post
Here's a demo that compiles correctly with both VS2008 & VS2010, but exceptions under VS2010.
I didn't test it, but wouldn't the solution be to take the buffer out of the allocator? Something like
Code:
int main()
{
    const size_t MAX_SIZE = 1024; // bytes
    char buffer[MAX_SIZE];

    std::vector<int, ArrayAllocator<int, MAX_SIZE>> test(
        ArrayAllocator<int, MAX_SIZE>(buffer));
//...
}
where the buffer is passed to the allocator's constructor.