It seems you are calling the other constructor here, this won't work(*). By a quick inspection it seems to me you don't need a constructor that takes ScopedStdioHandle, since you always creating new objects passing the path, right? It could be turned into a protected method to be used by both implementations if really necessary.




(*): There's a related new feature in C++11 but we can't use it yet.