win32 indent problem: local static DLL saga

This commit is contained in:
Matej Sekoranja
2014-11-06 22:18:58 +01:00
parent f36c8ce280
commit 4e671a1c21
4 changed files with 11 additions and 8 deletions

View File

@@ -26,7 +26,14 @@ namespace epics { namespace pvData {
namespace format
{
std::ostream& operator<<(std::ostream& os, indent_level const& indent)
static int indent_index = std::ios_base::xalloc();
long& indent_value(std::ios_base& ios)
{
return ios.iword(indent_index);
}
std::ostream& operator<<(std::ostream& os, indent_level const& indent)
{
indent_value(os) = indent.level;
return os;