#include <iostream> using namespace std; struct X { explicit X(int x = 1, int y = 1) { } }; int main() { X x; X x1 = 1; X x2(2, 3); return 0; }
Standard input is empty
prog.cpp: In function ‘int main()’: prog.cpp:13:9: error: conversion from ‘int’ to non-scalar type ‘X’ requested X x1 = 1; ^
Standard output is empty