Hi Per, I think you'll find that \n is working - it creates a newline, but just isn't doing a flush like you want it to. For a flush you need to do use std::endl. I believe this is appropriate std::ostream behaviour.
Robert. On 9 July 2014 13:38, Per Nordqvist <[email protected]> wrote: > Hi Robert & all, > > When I run the program below I only see notice 2+3. > When I uncomment the 4th notice they all appear but in order 2314. > So it seems that osg::notify waits for a std::endl to flush, but > shouldn't \n do the job as well? > > (I am on xubuntu 12.04, OSG 3.0.1, OSG_NOTIFY_LEVEL=NOTICE) > > Thanks! > > Per Nordqvist > > -------------------------------------- > #include <osg/Notify> > #include <iostream> > > int main(int argc, char* argv[]) > { > osg::notify(osg::NOTICE) << "1 notify with \\n\n"; > std::cout << "2 cout with \\n\n"; > std::cout << "3 cout with endl" << std::endl; > > // uncomment to display first notice > //osg::notify(osg::NOTICE) << "4 notify with endl" << std::endl; > > return 0; > } > -------------------------------------- > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

