kastnermario / yaml-cpp

Automatically exported from code.google.com/p/yaml-cpp
MIT License
0 stars 0 forks source link

Deprecating boost and implementing C++11 support #264

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Requiring the adoption of the boost libraries so as to use yaml-cpp is 
problematic for many developers.

Given that the C++11 standard library now includes all the features yaml-cpp 
currently uses from boost, it would be good to deprecate the use of boost in 
favour of C++11.

Original issue reported on code.google.com by bruno.j....@gmail.com on 12 Nov 2014 at 3:03

GoogleCodeExporter commented 8 years ago
I had a go at doing this myself. I got stuck at replacing 
boost::iterator_adaptor and boost::iterator_facade. There are no C++11 standard 
library equivalents. It is a non-trivial task to re-implement them or work 
around the lack of those two boost features. To be honest, the cursory 
examination I made of the yaml-cpp source had me lost as to how they are being 
used exactly. There are quite a few levels of indirection in the implementation 
of the iterators and I didn't have to time to dive too deeply into it. 

The rest is trivial refactoring to use std::XXX instead of boost::XXX.

Original comment by bruno.j....@gmail.com on 13 Nov 2014 at 1:18

GoogleCodeExporter commented 8 years ago
I agree. I think I'll do one more bug fix release with boost, and then bump the 
first version number with the C++11 stuff.

Original comment by jbe...@gmail.com on 13 Nov 2014 at 2:31

GoogleCodeExporter commented 8 years ago
Great thanks!

As I said in the comment, I had a brief attempt at doing it myself but got
lost in the boost::iterator code which I'm not at all familiar with.

b

Original comment by bruno.j....@gmail.com on 13 Nov 2014 at 2:46

GoogleCodeExporter commented 8 years ago
Thank you.  The big issue with me was the use of boost::shared_ptr since if you 
mix boost shared pointers and std shared pointers they don't tend to get along 
well.

As for iterator adaptor there's a C++11 library for that.

http://en.cppreference.com/w/cpp/iterator

I don't know if that will do everything you need but it should solve at least 
some of it.

Original comment by del...@gmail.com on 13 Nov 2014 at 6:46

GoogleCodeExporter commented 8 years ago
Has this been done? Can you share your changes?

Original comment by rui.pacheco on 10 Jan 2015 at 4:07

GoogleCodeExporter commented 8 years ago
Hi,

sorry no, I've not done it all. The boost iterator_facade and
iterator_adaptor are pretty huge pieces of work and they don't really map
to std::iterator. I don't have the time to learn exactly what those two
boost classes do. Were you using them to implement simple forward iterators?

b

Original comment by bruno.j....@gmail.com on 10 Jan 2015 at 9:35

GoogleCodeExporter commented 8 years ago
Nah, just wondering if someone had weaned yaml-cpp from Boost. I'll use
something else then.

Original comment by rui.pacheco on 10 Jan 2015 at 1:15

GoogleCodeExporter commented 8 years ago
Is there another c++ yaml library that's 1.2 compliant?  I haven't found one.

I also tried replacing std::auto_ptr with std::unique_ptr but it's not a drop 
in replacement as others have noted.

Original comment by del...@gmail.com on 10 Jan 2015 at 2:17

GoogleCodeExporter commented 8 years ago
Nope, I’m using https://bitbucket.org/xi/libyaml/overview

I can’t afford to migrate this to C++11. I guess I’ll come back to this 
project in the future.

Original comment by rui.pacheco on 10 Jan 2015 at 2:51

GoogleCodeExporter commented 8 years ago
It sounds like this is a fairly often-requested issue. I'll do this next time I 
work on the library (O(weeks), hopefully).

Original comment by jbe...@gmail.com on 10 Jan 2015 at 5:14

GoogleCodeExporter commented 8 years ago
Issue 245 has been merged into this issue.

Original comment by jbe...@gmail.com on 10 Jan 2015 at 5:15

GoogleCodeExporter commented 8 years ago
Issue 245 has been merged into this issue.

Original comment by jbe...@gmail.com on 12 Jan 2015 at 2:59

GoogleCodeExporter commented 8 years ago
Issue 245 has been merged into this issue.

Original comment by jbe...@gmail.com on 12 Jan 2015 at 3:26

GoogleCodeExporter commented 8 years ago
So, what seems to be holding up the removal of boost from this project?

Original comment by ARandomFurry on 25 Jan 2015 at 2:23

GoogleCodeExporter commented 8 years ago
I'm going to release 0.5.2, and then do it.

Original comment by jbe...@gmail.com on 25 Jan 2015 at 3:23

GoogleCodeExporter commented 8 years ago
Issue 281 has been merged into this issue.

Original comment by jbe...@gmail.com on 26 Feb 2015 at 2:37

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
A quick fix would be to include the required boost headers in the library, and 
then migrate to C++11!
And if I would be the developer, I would make it like this:
<0.5: without C++11, without Boost(old API)
0.5: without C++11, with Boost(new API)
0.6: with C++11, without Boost(new API)

Original comment by youralph...@gmail.com on 26 Feb 2015 at 3:06

GoogleCodeExporter commented 8 years ago
The plan is to use C++11 for 0.6.

Original comment by jbe...@gmail.com on 26 Feb 2015 at 3:11

GoogleCodeExporter commented 8 years ago
I really need that update, since my project requires a YAML 1.2 parser in C++ 
WITHOUT Boost!
Can you tell me when 0.6 will be released?

Original comment by youralph...@gmail.com on 28 Feb 2015 at 7:09

GoogleCodeExporter commented 8 years ago
I would prefer C++11 too, as introducing boost only for yaml-cpp is not 
affordable for me. The main issue is to find a boost::iterator equivalent way.

Original comment by l...@draios.com on 2 Mar 2015 at 10:56

GoogleCodeExporter commented 8 years ago
This is going to happen, but more comments will not make it go faster. (I have 
a full-time job, a life, etc.) Please just star the issue to indicate your 
support.

Original comment by jbe...@gmail.com on 2 Mar 2015 at 2:15

GoogleCodeExporter commented 8 years ago
Now that Google Code is going to happen, please don't forget to post the 
address of this project on github (?) so we can keep track of this issue (and 
others of the issues they opened).

Original comment by rui.pacheco on 13 Mar 2015 at 9:22

GoogleCodeExporter commented 8 years ago
Don't worry, I'll follow their redirecting instructions.

Original comment by jbe...@gmail.com on 13 Mar 2015 at 1:03

GoogleCodeExporter commented 8 years ago

Original comment by jbe...@gmail.com on 29 Mar 2015 at 7:44

GoogleCodeExporter commented 8 years ago
This issue has moved to github: https://github.com/jbeder/yaml-cpp/issues/264

Original comment by jbe...@gmail.com on 1 Apr 2015 at 3:29