12 // Inherit from std::ifstream to accept UTF-8 filenames
13 class ifstream final
: public std::ifstream
{
15 explicit ifstream(const char *filename
, std::ios_base::openmode mode
=std::ios_base::in
);
16 explicit ifstream(const std::string
&filename
, std::ios_base::openmode mode
=std::ios_base::in
)
17 : ifstream
{filename
.c_str(), mode
} { }
19 explicit ifstream(const wchar_t *filename
, std::ios_base::openmode mode
=std::ios_base::in
)
20 : std::ifstream
{filename
, mode
} { }
21 explicit ifstream(const std::wstring
&filename
, std::ios_base::openmode mode
=std::ios_base::in
)
22 : ifstream
{filename
.c_str(), mode
} { }
24 void open(const char *filename
, std::ios_base::openmode mode
=std::ios_base::in
);
25 void open(const std::string
&filename
, std::ios_base::openmode mode
=std::ios_base::in
)
26 { open(filename
.c_str(), mode
); }
39 using ifstream
= std::ifstream
;
45 #endif /* AL_FSTREAM_H */