-
October 21st, 2013, 03:14 PM
#1
initializer_list : No such file or directory
Hi !
I have a project that compiles fine with VS 2010.
As I compile it with VS 2012 it generates the entitled error.
Why ?
Thanks
-
October 21st, 2013, 03:25 PM
#2
Re: initializer_list : No such file or directory
I didn't change anything.
As I begin typing #include <ini ... The editor doesn't suggest initializer_list
-
October 21st, 2013, 04:17 PM
#3
Re: initializer_list : No such file or directory
The code is :
class A : public std::list<B> {
public:
A(std::initializer_list<B> l) {
insert(end(), l.begin(), l.end());
}
A() : std::list<B>() {}
};
When I include <initializer_list> I get the error, but no error on the code.
When I remove the include I get errors on each line of the code
-
October 21st, 2013, 07:53 PM
#4
Re: initializer_list : No such file or directory
Originally Posted by mulfycrowh
The code is :
When I include <initializer_list> I get the error, but no error on the code.
When I remove the include I get errors on each line of the code
I'm responding from my cell phone so I can't check myself. Search on msdn for std::initializer_list to find the appropriate header file to include.
-
October 21st, 2013, 11:34 PM
#5
Re: initializer_list : No such file or directory
It's <initializer_list>. So I do not understand.
-
October 22nd, 2013, 02:28 AM
#6
Re: initializer_list : No such file or directory
Now that I'm on a computer, I can look into this.
Looks like it wasn't in the 2010 and 2012 VC release version, but is in VC 2013.
http://msdn.microsoft.com/en-us/libr.../hh567368.aspx
Apparently the initializer_list header was inadvertently added to the VC 2010 RC, but then removed for the release.
http://connect.microsoft.com/VisualS...ease-candidate
According to the last link, it never worked anyway (because even though the file was present in the RC, the compiler didn't support the feature).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|