Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inlining reader::request::value() to avoid redefinition #44

Merged
merged 1 commit into from Aug 29, 2016

Conversation

tarc
Copy link
Contributor

@tarc tarc commented Aug 26, 2016

If boost::http::buffered_socket was being used as member of a class implemented in a .cpp, for instance, the linker complained about redefinition in the file including the header of the class and in the object resulting of compilation of the class itself.

To avoid redefinition.
@vinipsmaker
Copy link
Member

Gonna accept the PR, don't worry. Could you paste the build failure messages and report the used compiler, btw?

@tarc
Copy link
Contributor Author

tarc commented Aug 28, 2016

Sure.

Microsoft Visual Studio Community 2015 (Version 14.0.25123.00 Update 2).

2>HTTP.obj : error LNK2005: "public: class boost::basic_string_ref<char,struct std::char_traits<char> > __cdecl boost::http::reader::request::value<struct boost::http::token::method>(void)const " (??$value@Umethod@token@http@boost@@@request@reader@http@boost@@QEBA?AV?$basic_string_ref@DU?$char_traits@D@std@@@3@XZ) already defined in App.obj
2>HTTP.obj : error LNK2005: "public: class boost::basic_string_ref<char,struct std::char_traits<char> > __cdecl boost::http::reader::request::value<struct boost::http::token::request_target>(void)const " (??$value@Urequest_target@token@http@boost@@@request@reader@http@boost@@QEBA?AV?$basic_string_ref@DU?$char_traits@D@std@@@3@XZ) already defined in App.obj
2>HTTP.obj : error LNK2005: "public: int __cdecl boost::http::reader::request::value<struct boost::http::token::version>(void)const " (??$value@Uversion@token@http@boost@@@request@reader@http@boost@@QEBAHXZ) already defined in App.obj
2>HTTP.obj : error LNK2005: "public: class boost::basic_string_ref<char,struct std::char_traits<char> > __cdecl boost::http::reader::request::value<struct boost::http::token::field_name>(void)const " (??$value@Ufield_name@token@http@boost@@@request@reader@http@boost@@QEBA?AV?$basic_string_ref@DU?$char_traits@D@std@@@3@XZ) already defined in App.obj
2>HTTP.obj : error LNK2005: "public: class boost::basic_string_ref<char,struct std::char_traits<char> > __cdecl boost::http::reader::request::value<struct boost::http::token::field_value>(void)const " (??$value@Ufield_value@token@http@boost@@@request@reader@http@boost@@QEBA?AV?$basic_string_ref@DU?$char_traits@D@std@@@3@XZ) already defined in App.obj
2>HTTP.obj : error LNK2005: "public: class boost::asio::const_buffer __cdecl boost::http::reader::request::value<struct boost::http::token::body_chunk>(void)const " (??$value@Ubody_chunk@token@http@boost@@@request@reader@http@boost@@QEBA?AVconst_buffer@asio@3@XZ) already defined in App.obj

@vinipsmaker vinipsmaker merged commit 72b06c8 into BoostGSoC14:master Aug 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants