René's URL Explorer Experiment


Title: Build fails with CPP0X enabled. · Issue #46 · etr/libhttpserver · GitHub

Open Graph Title: Build fails with CPP0X enabled. · Issue #46 · etr/libhttpserver

X Title: Build fails with CPP0X enabled. · Issue #46 · etr/libhttpserver

Description: I just attempted to build the library with cpp0x support enabled and I encountered build errors. I have tracked down the issues and have outlined them below. First, in src/httpserver/webserver.hpp, in the #include section, is condi...

Open Graph Description: I just attempted to build the library with cpp0x support enabled and I encountered build errors. I have tracked down the issues and have outlined them below. First, in src/httpserver/webserver.hpp,...

X Description: I just attempted to build the library with cpp0x support enabled and I encountered build errors. I have tracked down the issues and have outlined them below. First, in src/httpserver/webserver.hpp,...

Opengraph URL: https://github.com/etr/libhttpserver/issues/46

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Build fails with CPP0X enabled.","articleBody":"I just attempted to build the library with cpp0x support enabled and I encountered build errors. I have tracked down the issues and have outlined them below.\n\nFirst, in `src/httpserver/webserver.hpp`, in the `#include` section, `\u003cset\u003e` is conditionally included if `CPP0X` support is not enabled (https://github.com/etr/libhttpserver/blob/master/src/httpserver/webserver.hpp#L36-40). This causes errors because `std::set` is used elsewhere throughout the code. This can be fixed by changing:\n\n```\n#ifdef USE_CPP_ZEROX\n#include \u003cunordered_set\u003e\n#else \n#include \u003cset\u003e\n#endif \n```\n\nto\n\n```\n#ifdef USE_CPP_ZEROX\n#include \u003cunordered_set\u003e\n#endif \n#include \u003cset\u003e\n```\n\nNext, when declaring the `bans` and `allowances` variables on https://github.com/etr/libhttpserver/blob/master/src/httpserver/webserver.hpp#L238-244, `std::unordered_set` is used if CPP0X support is enabled, but the type that it stores (`http::ip_representation`) does not have `std::hash` defined for it. In my opinion, unordered set may not be required here as _O(lg n)_ lookup is probably sufficient for the purposes that it serves, and the time gain that you would get with _O(1)_ lookup with unordered set likely doesn't outweigh the space overhead. \n\nNext, in `src/webserver.cpp`, there are quite a few instances where `std::make_pair` is called but the template arguments are provided; they should always be omitted with `make_pair`, and because C++0x is stricter with type conversions, they fail to compile. The offending lines are https://github.com/etr/libhttpserver/blob/master/src/webserver.cpp#L252, https://github.com/etr/libhttpserver/blob/master/src/webserver.cpp#L1417, and https://github.com/etr/libhttpserver/blob/master/src/webserver.cpp#L1428.\n\nLastly, for some reason, when running configure with CPP0X enabled, the --std=c++0x flag is missing from somewhere in the generated Makefile. To fix this I had to run the configure command as follows:\n\n```\nCXXFLAGS=--std=c++11 ../libhttpserver/configure --prefix=/usr --enable-cpp0x\n```\n\nI have no clue how the configure script works so I don't know what would have to be modified to make this work out of the box.\n","author":{"url":"https://github.com/m-renaud","@type":"Person","name":"m-renaud"},"datePublished":"2014-03-06T16:30:51.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/46/libhttpserver/issues/46"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:6d6266b0-d539-f281-b7a5-5973e8694a29
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC6B0:B319:B803FA:F944F1:6A531AB7
html-safe-nonceac2843d008724eb739babbf327b0fee6e29fcbe0c895bedacdb1e10164ed45bb
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNkIwOkIzMTk6QjgwM0ZBOkY5NDRGMTo2QTUzMUFCNyIsInZpc2l0b3JfaWQiOiI3NTMyNjA1MTg0MTQ2NjEwODcxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacd69c28dc9ab532897b5a5487535d92c0b569933e74cb598dcfa27cc58debbaa5
hovercard-subject-tagissue:28892781
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/etr/libhttpserver/46/issue_layout
twitter:imagehttps://opengraph.githubassets.com/4e3ed0655024b11dd0b6509e67d8e141b8c68d869ef43332b4a00bbea4e3c007/etr/libhttpserver/issues/46
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/4e3ed0655024b11dd0b6509e67d8e141b8c68d869ef43332b4a00bbea4e3c007/etr/libhttpserver/issues/46
og:image:altI just attempted to build the library with cpp0x support enabled and I encountered build errors. I have tracked down the issues and have outlined them below. First, in src/httpserver/webserver.hpp,...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamem-renaud
hostnamegithub.com
expected-hostnamegithub.com
Noneb9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb
turbo-cache-controlno-preview
go-importgithub.com/etr/libhttpserver git https://github.com/etr/libhttpserver.git
octolytics-dimension-user_id1201536
octolytics-dimension-user_loginetr
octolytics-dimension-repository_id3416891
octolytics-dimension-repository_nwoetr/libhttpserver
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id3416891
octolytics-dimension-repository_network_root_nwoetr/libhttpserver
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release07a982c1d40157c619b364352b704c3ce66bb332
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/etr/libhttpserver/issues/46#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fetr%2Flibhttpserver%2Fissues%2F46
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fetr%2Flibhttpserver%2Fissues%2F46
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=etr%2Flibhttpserver
Reloadhttps://github.com/etr/libhttpserver/issues/46
Reloadhttps://github.com/etr/libhttpserver/issues/46
Reloadhttps://github.com/etr/libhttpserver/issues/46
etr https://github.com/etr
libhttpserverhttps://github.com/etr/libhttpserver
Notifications https://github.com/login?return_to=%2Fetr%2Flibhttpserver
Fork 191 https://github.com/login?return_to=%2Fetr%2Flibhttpserver
Star 942 https://github.com/login?return_to=%2Fetr%2Flibhttpserver
Code https://github.com/etr/libhttpserver
Issues 15 https://github.com/etr/libhttpserver/issues
Pull requests 4 https://github.com/etr/libhttpserver/pulls
Actions https://github.com/etr/libhttpserver/actions
Projects https://github.com/etr/libhttpserver/projects
Wiki https://github.com/etr/libhttpserver/wiki
Security and quality 0 https://github.com/etr/libhttpserver/security
Insights https://github.com/etr/libhttpserver/pulse
Code https://github.com/etr/libhttpserver
Issues https://github.com/etr/libhttpserver/issues
Pull requests https://github.com/etr/libhttpserver/pulls
Actions https://github.com/etr/libhttpserver/actions
Projects https://github.com/etr/libhttpserver/projects
Wiki https://github.com/etr/libhttpserver/wiki
Security and quality https://github.com/etr/libhttpserver/security
Insights https://github.com/etr/libhttpserver/pulse
Build fails with CPP0X enabled.https://github.com/etr/libhttpserver/issues/46#top
https://github.com/m-renaud
m-renaudhttps://github.com/m-renaud
on Mar 6, 2014https://github.com/etr/libhttpserver/issues/46#issue-28892781
https://github.com/etr/libhttpserver/blob/master/src/httpserver/webserver.hpp#L36-40https://github.com/etr/libhttpserver/blob/master/src/httpserver/webserver.hpp#L36-40
https://github.com/etr/libhttpserver/blob/master/src/httpserver/webserver.hpp#L238-244https://github.com/etr/libhttpserver/blob/master/src/httpserver/webserver.hpp#L238-244
https://github.com/etr/libhttpserver/blob/master/src/webserver.cpp#L252https://github.com/etr/libhttpserver/blob/master/src/webserver.cpp#L252
https://github.com/etr/libhttpserver/blob/master/src/webserver.cpp#L1417https://github.com/etr/libhttpserver/blob/master/src/webserver.cpp#L1417
https://github.com/etr/libhttpserver/blob/master/src/webserver.cpp#L1428https://github.com/etr/libhttpserver/blob/master/src/webserver.cpp#L1428
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.