203                     void writelines(T const& seq){
204                         for(auto &it : seq)
205                             write(*it);
206                     }

The compiler soesn't seem to get the type of it rigth. It says that it
doesn't have any operator* ...
What am i doing wrong?

On 23/02/2013 18:47, serge-sans-paille wrote:
> In pythran/pythonic++/core/file.h:
> 
>> +						throw IOError("file.write() :  File not opened for writing.");
>> +					if (size <0) size = this->tell();
>> +					ftruncate(fileno(), size);
>> +				}
>> +
>> +				void write(core::string const& str){
>> +					if(not is_open) throw ValueError("I/O operation on closed file");
>> +					if (mode.find_first_of("wa+") == std::string::npos) 
>> +						throw IOError("file.write() :  File not opened for writing.");
>> +					fwrite(str.c_str(), sizeof(char), str.length(), **data);
>> +				}
>> +
>> +				template<class T>
>> +					void writelines(T const& seq){
>> +						auto end = seq.end();
>> +						for(auto it = seq.begin(); it != end; ++it){
> 
> totally. for(auto & it : seq) is still an option (note the &)
> 
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/serge-sans-paille/pythran/pull/49/files#r3127062>.
>