Don't inline ifstream destructor

This commit is contained in:
Chris Robinson
2019-06-18 23:04:24 -07:00
parent 0fa984027c
commit 723ab7f15a
2 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -76,10 +76,10 @@ public:
ifstream(const wchar_t *filename, std::ios_base::openmode mode = std::ios_base::in);
ifstream(const std::wstring &filename, std::ios_base::openmode mode = std::ios_base::in)
: ifstream(filename.c_str(), mode) { }
ifstream(const char *filename, std::ios_base::openmode mode = std::ios_base::in);
ifstream(const std::string &filename, std::ios_base::openmode mode = std::ios_base::in)
: ifstream(filename.c_str(), mode) { }
~ifstream() override;
bool is_open() const noexcept { return mStreamBuf.is_open(); }
};
+6
View File
@@ -424,6 +424,12 @@ ifstream::ifstream(const char *filename, std::ios_base::openmode mode)
clear(failbit);
}
/* This is only here to ensure the compiler doesn't define an implicit
* destructor, which it tries to automatically inline and subsequently complain
* it can't inline without excessive code growth.
*/
ifstream::~ifstream() { }
} // namespace al
const PathNamePair &GetProcBinary()