c++ - std::experimental::generator write access violation -
i running code on visual studio 2015 update 1 , getting weird access violation error @ place denoted below. if simplify expression int mid = (max - min) / 2;
code works fine.
#include <experimental/generator> std::experimental::generator<int> range(int min, int max) { int mid = min + (max - min) / 2; // write access violation yield mid; } int main() { (auto x : range(10, 20)) { } }
does know might problem? suspecting might compiler bug.
this confirmed bug in visual studio 2015 update 1: https://connect.microsoft.com/visualstudio/feedback/details/2337518/std-experimental-generator-write-access-violation
it reportedly fixed in update 2
Comments
Post a Comment