1
#include <initializer_list>
#include <iterator>
int main()
{
int parameters[4]{1, 2, 3, 4};
auto b = std::begin(parameters);
auto e = std::end(parameters);
std::initializer_list<int> il(b,e); // where is the constructor specified in the standard?
}
나는 another question에 답이 동작을 사용하지만, 몇 가지 조사를하는 동안 나는이 생성자는 not actually in the standard 것으로 나타났습니다.
/Za
및 /permissive-
플래그가있는 언어 확장 기능을 해제했지만 여전히 컴파일됩니다.
MSVC의 버그입니까?
흠을 것 같다. 왜 내가 downvote 궁금해? – wally
gcc도 clang도 이것을 컴파일하지 않으므로 VS 확장자처럼 보입니다 – bolov
@bolov'/ Za' 플래그가 무시되는 버그라고 생각합니까? – wally