The template class fpos<stateT> is a class used for specifying file position information. The template parameter corresponds to the type needed to hold state information in a multi-byte sequence (typically mbstate_t from <cwchar>). fpos is essentially a wrapper for whatever mechanisms are necessary to hold a stream position (and multi-byte state). In fact the standard stream position typedefs are defined in terms of fpos:
typedef fpos<mbstate_t> streampos; typedef fpos<mbstate_t> wstreampos;
The template class fpos is typically used in the istream and ostream classes in calls involving file position such as tellg, tellp, seekg and seekp. Though in these classes the fpos is typedef'd to pos_type, and can be changed to a custom implementation by specifying a traits class in the stream's template parameters.