Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Stephan T. Lavavej - Core C++, 6 of n
Nov 21, 2012 at 1:25 PMStephan,
Great video. I am having a problem with uniform initialization. When I try to call an explicit constructor with uniform initialization, I get the following error.
error C2440: 'initializing' : cannot convert from 'initializer-list' to 'S'
Below is s small example
struct S{ explicit S(int){} }; int main(){ S s{10}; }I originally got this error when using the brace initialization with ifstream which has a explicit constructor.
The error resolves with either using parentheses instead of braces, or making the constructor not explicit.
Is this a compiler bug, or is there something I am not understanding about uniform initialization