can't you write
) : data(filename, strmode) {
}

?