Opened 8 years ago
Last modified 8 years ago
#10347 new Patches
Boost.ProgramOptions without RTTI
Reported by: | Owned by: | Vladimir Prus | |
---|---|---|---|
Milestone: | To Be Determined | Component: | program_options |
Version: | Boost 1.56.0 | Severity: | Problem |
Keywords: | Cc: |
Description
Program options utilizes typeid in value semantic. This is a patch for compiling it without RTTI on.
Attachments (2)
Change History (6)
by , 8 years ago
Attachment: | program_options_without_rtti.patch added |
---|
follow-up: 2 comment:1 by , 8 years ago
comment:2 by , 8 years ago
Replying to vladimir_prus:
How will it actually work without rtti? I think boost::any pretty much requires it.
Yes, I've also submitted a patch to boost::any. Actually I'm not quite sure about how will go on with detail/typeinfo.hpp, when there is the new library type_index in 1.56.0.
comment:3 by , 8 years ago
I'm trying boost::program_options 1.56 release with "-fno-rtti" flag and i'm getting error:
/softdev/boost-1.56/include/boost/any.hpp:149:48: error: cannot use typeid with -fno-rtti
return content ? content->type() : typeid(void);
can i use boost::program_options with no rtti?
my problem: http://stackoverflow.com/questions/26354991/combine-fno-rtti-lib-and-rtti-lib-while-compiling
by , 8 years ago
Attachment: | 0001-Using-type_index-to-avoid-RTTIs-in-program_options.-.patch added |
---|
Using type_index to avoid RTTIs.
comment:4 by , 8 years ago
Since boost::any has switched to boost::type_index, also using type_index here is reasonable to remove rtti.
A pull request is generated, too.
How will it actually work without rtti? I think boost::any pretty much requires it.