Re: [osg-users] C++11 for next stable release of OpenSceneGraph?

2018-06-12 Thread Sebastian Messerschmidt



Hi Daniel,

Sorry I was mixing up VSG and OSG here. For OSG you're totally right 
with your concerns.


Cheers
Sebastian > Hi Daniel, > Hi Sebastian,



I'd rather target C++14/17 though since almost all modern compilers
are good at keeping up with the new features (even Microsoft is doing
a good job here).


you just have to consider that switching compilers isn't that easy for
everyone, because they've constraints that aren't completely under their
control.


But VSG is a fresh start and there are no existing projects that use it 
a this point. So "switching" compilers is not an issue, right? I mean if 
someone is planning on using it, using a modern compiler is simply a 
prerequisite. Since the project just started I think it won't be used in 
production before 2019. Until then most environments should be up2date 
with C++14 conforming compilers.




So going for C++11 should be fine at this point in time, but I wouldn't
go beyond.


Most C++11 compilers I've encountered support a subset of C++14 anyways, 
which is why I also pointed out, that defining a set of features might 
be possible too.



Cheers
Sebastian
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] C++11 for next stable release of OpenSceneGraph?

2018-06-12 Thread Robert Osfield
HI Guys,

Thanks for the feedback on adopting C++11 and later for the next
stable OpenSceneGraph release.

I am not planning on radical change to OSG in this timeframe, instead
where things will be cleaned up and it's an easy change to adopt
recent C++ functionality to achieve this.  I don't foresee a general
walk through of the OSG codebase changing everything we can to a
modern C++ way of doing things just because it could be done.

FYI, prior to the 3.6.1 release I stepped through making sure it built
cleanly under C++11, 14 and 17, the only thing I had to amend was to
replace the deprecated C++ usage.  This means that 3.6.1 is forwards
and backwards compatible to a wide range of C++ compilers.

For me, the key thing for the OpenSceneGraph project is now stability.
I want it to be a rock solid base for people to develop and maintain
their graphics application upon.

Cheers,
Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] C++11 for next stable release of OpenSceneGraph?

2018-06-12 Thread Sebastian Messerschmidt

Hi Daniel, > Hi Sebastian,



I'd rather target C++14/17 though since almost all modern compilers
are good at keeping up with the new features (even Microsoft is doing
a good job here).


you just have to consider that switching compilers isn't that easy for
everyone, because they've constraints that aren't completely under their
control.


But VSG is a fresh start and there are no existing projects that use it 
a this point. So "switching" compilers is not an issue, right? I mean if 
someone is planning on using it, using a modern compiler is simply a 
prerequisite. Since the project just started I think it won't be used in 
production before 2019. Until then most environments should be up2date 
with C++14 conforming compilers.




So going for C++11 should be fine at this point in time, but I wouldn't
go beyond.


Most C++11 compilers I've encountered support a subset of C++14 anyways, 
which is why I also pointed out, that defining a set of features might 
be possible too.



Cheers
Sebastian
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] C++11 for next stable release of OpenSceneGraph?

2018-06-12 Thread Daniel Trstenjak
Hi Sebastian,

> I'd rather target C++14/17 though since almost all modern compilers
> are good at keeping up with the new features (even Microsoft is doing
> a good job here).

you just have to consider that switching compilers isn't that easy for
everyone, because they've constraints that aren't completely under their
control.

So going for C++11 should be fine at this point in time, but I wouldn't
go beyond.

Greetings,
Daniel
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] C++11 for next stable release of OpenSceneGraph?

2018-06-12 Thread Sebastian Messerschmidt

Hi,

I totally support the step to use a more modern feature set of C++. It 
really makes code easier to read, maintain and coding more fun. I'd 
rather target C++14/17 though since almost all modern compilers are good 
at keeping up with the new features (even Microsoft is doing a good job 
here).  If you consider this too much of a stretch, you might consider 
to simply constrain the set of features allowed for now (excluding not 
so well supported ones).


Another word on coding style: Lambdas, especially when the get more 
complex should follow a consistent style. Else they tend to increase the 
parsing effort for the human brain beyond most people's limit.


From my experience the should always be defined and named before use in 
a function. This way the function of the lambda is stated by the name 
which saves a lot of guesswork.


E.g.

 the "auto" inside the lambda params is a C++14 feature btw.
auto find_name= [](const auto& elem){return token==elem.name;};

std::find_if(std::begin(elements), std::end(elements), find_name);

instead of:
std::find_if(std::begin(elements), std::end(elements), [](const 
auto& elem){return token==elem.name;});



Cheers
Sebastian
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] C++11 for next stable release of OpenSceneGraph?

2018-06-11 Thread Björn Blissing
I am also in total support to move to C++11.

I am even inclined to favor moving all the way to C++17, which includes some 
nice features (my favorite being allowing initializers in if and switch 
statements). And even Visual Studio is somewhat conformant:
https://blogs.msdn.microsoft.com/vcblog/2018/05/07/announcing-msvc-conforms-to-the-c-standard/

Regards
Björn

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=74041#74041





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] C++11 for next stable release of OpenSceneGraph?

2018-06-11 Thread Chris Hanson
I'm totally in support of moving to C++11.



On Mon, Jun 11, 2018 at 2:14 AM Alberto Luaces  wrote:

> Robert Osfield writes:
>
> > I would suggest that OpenSceneGraph-3.x series remain compilable
> > without needing C++11.  So 3.6.x for instance we'll make bug fixes etc
> > but never change the compiler requirements.
>
> Having that fallback (3.x) for the tiny amount of systems that don't
> support C++11 is a sensible approach, and I would even dare to say
> extra-conservative, given the support of C+11 among current compilers.
>
> --
> Alberto
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>


-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 •
GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Legal/IP • Forensics • Imaging • UAVs • GIS • GPS •
osgEarth • Terrain • Telemetry • Cryptography • LIDAR • Embedded • Mobile •
iPhone/iPad/iOS • Android
@alphapixel  facebook.com/alphapixel (775)
623-PIXL [7495]
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] C++11 for next stable release of OpenSceneGraph?

2018-06-11 Thread Alberto Luaces
Robert Osfield writes:

> I would suggest that OpenSceneGraph-3.x series remain compilable
> without needing C++11.  So 3.6.x for instance we'll make bug fixes etc
> but never change the compiler requirements.

Having that fallback (3.x) for the tiny amount of systems that don't
support C++11 is a sensible approach, and I would even dare to say
extra-conservative, given the support of C+11 among current compilers.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org