{"action":"closed","number":1253,"pull_request":{"url":"https://api.github.com/repos/cyclus/cyclus/pulls/1253","id":70443614,"html_url":"https://github.com/cyclus/cyclus/pull/1253","diff_url":"https://github.com/cyclus/cyclus/pull/1253.diff","patch_url":"https://github.com/cyclus/cyclus/pull/1253.patch","issue_url":"https://api.github.com/repos/cyclus/cyclus/issues/1253","number":1253,"state":"closed","locked":false,"title":"Fix for anonymous namespaces, triggered by boost","user":{"login":"scopatz","id":320553,"avatar_url":"https://avatars.githubusercontent.com/u/320553?v=3","gravatar_id":"","url":"https://api.github.com/users/scopatz","html_url":"https://github.com/scopatz","followers_url":"https://api.github.com/users/scopatz/followers","following_url":"https://api.github.com/users/scopatz/following{/other_user}","gists_url":"https://api.github.com/users/scopatz/gists{/gist_id}","starred_url":"https://api.github.com/users/scopatz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scopatz/subscriptions","organizations_url":"https://api.github.com/users/scopatz/orgs","repos_url":"https://api.github.com/users/scopatz/repos","events_url":"https://api.github.com/users/scopatz/events{/privacy}","received_events_url":"https://api.github.com/users/scopatz/received_events","type":"User","site_admin":false},"body":"On boost v1.60.0, there are some terrible anonymous namespaces that are hidden by a macro call stack. In particular in `boost/type_traits/detail/has_postfix_operator.hpp`, we have effectively, \r\n\r\n```C++\r\nnamespace boost {\r\nnamespace detail {\r\n\r\n// This namespace ensures that argument-dependent name lookup does not mess things up.\r\nnamespace BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl) {\r\n\r\nstruct no_operator { };\r\n}\r\n}\r\n}\r\n```\r\n\r\nWhere the `BOOST_JOIN()` macro is defined as, \r\n\r\n```C++\r\n#define BOOST_JOIN( X, Y ) BOOST_DO_JOIN( X, Y )\r\n#define BOOST_DO_JOIN( X, Y ) BOOST_DO_JOIN2(X,Y)\r\n#define BOOST_DO_JOIN2( X, Y ) X##Y\r\n```\r\n\r\nThis was causing cycpp to fail with the following error:\r\n\r\n```console\r\nTraceback (most recent call last):\r\n  File \"/home/scopatz/miniconda3/conda-bld/work/cyclus-cd572972b3dbf4b6d24a8e500ff270a42e8b2c7d/cli/cycpp.py\", line 2317, in <module>\r\n    main()\r\n  File \"/home/scopatz/miniconda3/conda-bld/work/cyclus-cd572972b3dbf4b6d24a8e500ff270a42e8b2c7d/cli/cycpp.py\", line 2301, in main\r\n    context, superclasses = accumulate_state(canon)   # pass 2\r\n  File \"/home/scopatz/miniconda3/conda-bld/work/cyclus-cd572972b3dbf4b6d24a8e500ff270a42e8b2c7d/cli/cycpp.py\", line 861, in accumulate_state\r\n    state.accumulate(statement, sep)\r\n  File \"/home/scopatz/miniconda3/conda-bld/work/cyclus-cd572972b3dbf4b6d24a8e500ff270a42e8b2c7d/cli/cycpp.py\", line 713, in accumulate\r\n    filter.transform(statement, sep)\r\n  File \"/home/scopatz/miniconda3/conda-bld/work/cyclus-cd572972b3dbf4b6d24a8e500ff270a42e8b2c7d/cli/cycpp.py\", line 367, in transform\r\n    classname = state.classname()\r\n  File \"/home/scopatz/miniconda3/conda-bld/work/cyclus-cd572972b3dbf4b6d24a8e500ff270a42e8b2c7d/cli/cycpp.py\", line 685, in classname\r\n    return \"::\".join(names)\r\nTypeError: sequence item 2: expected str instance, NoneType found\r\n```\r\n\r\nbecause the particular `BOOST_JOIN` happened to evaluate to an empty string, creating an anonymous namespace, and thus the cycpp `self.namespaces == ['boost', 'detail', None, 'no_operator']`.\r\n\r\nThis PR replaces the None with `'<anonymous>'`. This will allow cycpp to skip such crazy cases, while also allowing it to fail at compile time if anyone tries to code generate to a class in an anonymous namespace (which is not allowed).\r\n\r\n@hodger or @FlanFlanagan, would you mind taking a look at this and merging it.  I need this to proceed with conda-forge packages.","created_at":"2016-05-17T22:47:38Z","updated_at":"2016-05-18T14:25:20Z","closed_at":"2016-05-18T14:25:20Z","merged_at":"2016-05-18T14:25:20Z","merge_commit_sha":"d507005bf49e5787b2c02dfab548b729a901f602","assignee":null,"milestone":{"url":"https://api.github.com/repos/cyclus/cyclus/milestones/32","html_url":"https://github.com/cyclus/cyclus/milestones/v1.4","labels_url":"https://api.github.com/repos/cyclus/cyclus/milestones/32/labels","id":1082340,"number":32,"title":"v1.4","description":"Tentatively set to be due the week before ANS","creator":{"login":"gidden","id":1392657,"avatar_url":"https://avatars.githubusercontent.com/u/1392657?v=3","gravatar_id":"","url":"https://api.github.com/users/gidden","html_url":"https://github.com/gidden","followers_url":"https://api.github.com/users/gidden/followers","following_url":"https://api.github.com/users/gidden/following{/other_user}","gists_url":"https://api.github.com/users/gidden/gists{/gist_id}","starred_url":"https://api.github.com/users/gidden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gidden/subscriptions","organizations_url":"https://api.github.com/users/gidden/orgs","repos_url":"https://api.github.com/users/gidden/repos","events_url":"https://api.github.com/users/gidden/events{/privacy}","received_events_url":"https://api.github.com/users/gidden/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":49,"state":"open","created_at":"2015-04-24T14:11:32Z","updated_at":"2016-05-18T14:25:20Z","due_on":"2015-06-01T05:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/cyclus/cyclus/pulls/1253/commits","review_comments_url":"https://api.github.com/repos/cyclus/cyclus/pulls/1253/comments","review_comment_url":"https://api.github.com/repos/cyclus/cyclus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cyclus/cyclus/issues/1253/comments","statuses_url":"https://api.github.com/repos/cyclus/cyclus/statuses/355be7301e3f8c112ebb685042c26474b7d236e3","head":{"label":"scopatz:cycpp","ref":"cycpp","sha":"355be7301e3f8c112ebb685042c26474b7d236e3","user":{"login":"scopatz","id":320553,"avatar_url":"https://avatars.githubusercontent.com/u/320553?v=3","gravatar_id":"","url":"https://api.github.com/users/scopatz","html_url":"https://github.com/scopatz","followers_url":"https://api.github.com/users/scopatz/followers","following_url":"https://api.github.com/users/scopatz/following{/other_user}","gists_url":"https://api.github.com/users/scopatz/gists{/gist_id}","starred_url":"https://api.github.com/users/scopatz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scopatz/subscriptions","organizations_url":"https://api.github.com/users/scopatz/orgs","repos_url":"https://api.github.com/users/scopatz/repos","events_url":"https://api.github.com/users/scopatz/events{/privacy}","received_events_url":"https://api.github.com/users/scopatz/received_events","type":"User","site_admin":false},"repo":{"id":3809841,"name":"cyclus","full_name":"scopatz/cyclus","owner":{"login":"scopatz","id":320553,"avatar_url":"https://avatars.githubusercontent.com/u/320553?v=3","gravatar_id":"","url":"https://api.github.com/users/scopatz","html_url":"https://github.com/scopatz","followers_url":"https://api.github.com/users/scopatz/followers","following_url":"https://api.github.com/users/scopatz/following{/other_user}","gists_url":"https://api.github.com/users/scopatz/gists{/gist_id}","starred_url":"https://api.github.com/users/scopatz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scopatz/subscriptions","organizations_url":"https://api.github.com/users/scopatz/orgs","repos_url":"https://api.github.com/users/scopatz/repos","events_url":"https://api.github.com/users/scopatz/events{/privacy}","received_events_url":"https://api.github.com/users/scopatz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/scopatz/cyclus","description":"The core of the Cyclus nuclear fuel cycle code from the University of Wisconsin, Madison","fork":true,"url":"https://api.github.com/repos/scopatz/cyclus","forks_url":"https://api.github.com/repos/scopatz/cyclus/forks","keys_url":"https://api.github.com/repos/scopatz/cyclus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scopatz/cyclus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scopatz/cyclus/teams","hooks_url":"https://api.github.com/repos/scopatz/cyclus/hooks","issue_events_url":"https://api.github.com/repos/scopatz/cyclus/issues/events{/number}","events_url":"https://api.github.com/repos/scopatz/cyclus/events","assignees_url":"https://api.github.com/repos/scopatz/cyclus/assignees{/user}","branches_url":"https://api.github.com/repos/scopatz/cyclus/branches{/branch}","tags_url":"https://api.github.com/repos/scopatz/cyclus/tags","blobs_url":"https://api.github.com/repos/scopatz/cyclus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scopatz/cyclus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scopatz/cyclus/git/refs{/sha}","trees_url":"https://api.github.com/repos/scopatz/cyclus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scopatz/cyclus/statuses/{sha}","languages_url":"https://api.github.com/repos/scopatz/cyclus/languages","stargazers_url":"https://api.github.com/repos/scopatz/cyclus/stargazers","contributors_url":"https://api.github.com/repos/scopatz/cyclus/contributors","subscribers_url":"https://api.github.com/repos/scopatz/cyclus/subscribers","subscription_url":"https://api.github.com/repos/scopatz/cyclus/subscription","commits_url":"https://api.github.com/repos/scopatz/cyclus/commits{/sha}","git_commits_url":"https://api.github.com/repos/scopatz/cyclus/git/commits{/sha}","comments_url":"https://api.github.com/repos/scopatz/cyclus/comments{/number}","issue_comment_url":"https://api.github.com/repos/scopatz/cyclus/issues/comments{/number}","contents_url":"https://api.github.com/repos/scopatz/cyclus/contents/{+path}","compare_url":"https://api.github.com/repos/scopatz/cyclus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scopatz/cyclus/merges","archive_url":"https://api.github.com/repos/scopatz/cyclus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scopatz/cyclus/downloads","issues_url":"https://api.github.com/repos/scopatz/cyclus/issues{/number}","pulls_url":"https://api.github.com/repos/scopatz/cyclus/pulls{/number}","milestones_url":"https://api.github.com/repos/scopatz/cyclus/milestones{/number}","notifications_url":"https://api.github.com/repos/scopatz/cyclus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scopatz/cyclus/labels{/name}","releases_url":"https://api.github.com/repos/scopatz/cyclus/releases{/id}","deployments_url":"https://api.github.com/repos/scopatz/cyclus/deployments","created_at":"2012-03-23T15:44:42Z","updated_at":"2014-12-02T23:22:25Z","pushed_at":"2016-05-18T03:46:51Z","git_url":"git://github.com/scopatz/cyclus.git","ssh_url":"git@github.com:scopatz/cyclus.git","clone_url":"https://github.com/scopatz/cyclus.git","svn_url":"https://github.com/scopatz/cyclus","homepage":"cyclus.github.com","size":14574,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"cyclus:develop","ref":"develop","sha":"cd572972b3dbf4b6d24a8e500ff270a42e8b2c7d","user":{"login":"cyclus","id":1355686,"avatar_url":"https://avatars.githubusercontent.com/u/1355686?v=3","gravatar_id":"","url":"https://api.github.com/users/cyclus","html_url":"https://github.com/cyclus","followers_url":"https://api.github.com/users/cyclus/followers","following_url":"https://api.github.com/users/cyclus/following{/other_user}","gists_url":"https://api.github.com/users/cyclus/gists{/gist_id}","starred_url":"https://api.github.com/users/cyclus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cyclus/subscriptions","organizations_url":"https://api.github.com/users/cyclus/orgs","repos_url":"https://api.github.com/users/cyclus/repos","events_url":"https://api.github.com/users/cyclus/events{/privacy}","received_events_url":"https://api.github.com/users/cyclus/received_events","type":"Organization","site_admin":false},"repo":{"id":3308958,"name":"cyclus","full_name":"cyclus/cyclus","owner":{"login":"cyclus","id":1355686,"avatar_url":"https://avatars.githubusercontent.com/u/1355686?v=3","gravatar_id":"","url":"https://api.github.com/users/cyclus","html_url":"https://github.com/cyclus","followers_url":"https://api.github.com/users/cyclus/followers","following_url":"https://api.github.com/users/cyclus/following{/other_user}","gists_url":"https://api.github.com/users/cyclus/gists{/gist_id}","starred_url":"https://api.github.com/users/cyclus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cyclus/subscriptions","organizations_url":"https://api.github.com/users/cyclus/orgs","repos_url":"https://api.github.com/users/cyclus/repos","events_url":"https://api.github.com/users/cyclus/events{/privacy}","received_events_url":"https://api.github.com/users/cyclus/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cyclus/cyclus","description":"The Cyclus Nuclear Fuel Cycle Simulator","fork":false,"url":"https://api.github.com/repos/cyclus/cyclus","forks_url":"https://api.github.com/repos/cyclus/cyclus/forks","keys_url":"https://api.github.com/repos/cyclus/cyclus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cyclus/cyclus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cyclus/cyclus/teams","hooks_url":"https://api.github.com/repos/cyclus/cyclus/hooks","issue_events_url":"https://api.github.com/repos/cyclus/cyclus/issues/events{/number}","events_url":"https://api.github.com/repos/cyclus/cyclus/events","assignees_url":"https://api.github.com/repos/cyclus/cyclus/assignees{/user}","branches_url":"https://api.github.com/repos/cyclus/cyclus/branches{/branch}","tags_url":"https://api.github.com/repos/cyclus/cyclus/tags","blobs_url":"https://api.github.com/repos/cyclus/cyclus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cyclus/cyclus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cyclus/cyclus/git/refs{/sha}","trees_url":"https://api.github.com/repos/cyclus/cyclus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cyclus/cyclus/statuses/{sha}","languages_url":"https://api.github.com/repos/cyclus/cyclus/languages","stargazers_url":"https://api.github.com/repos/cyclus/cyclus/stargazers","contributors_url":"https://api.github.com/repos/cyclus/cyclus/contributors","subscribers_url":"https://api.github.com/repos/cyclus/cyclus/subscribers","subscription_url":"https://api.github.com/repos/cyclus/cyclus/subscription","commits_url":"https://api.github.com/repos/cyclus/cyclus/commits{/sha}","git_commits_url":"https://api.github.com/repos/cyclus/cyclus/git/commits{/sha}","comments_url":"https://api.github.com/repos/cyclus/cyclus/comments{/number}","issue_comment_url":"https://api.github.com/repos/cyclus/cyclus/issues/comments{/number}","contents_url":"https://api.github.com/repos/cyclus/cyclus/contents/{+path}","compare_url":"https://api.github.com/repos/cyclus/cyclus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cyclus/cyclus/merges","archive_url":"https://api.github.com/repos/cyclus/cyclus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cyclus/cyclus/downloads","issues_url":"https://api.github.com/repos/cyclus/cyclus/issues{/number}","pulls_url":"https://api.github.com/repos/cyclus/cyclus/pulls{/number}","milestones_url":"https://api.github.com/repos/cyclus/cyclus/milestones{/number}","notifications_url":"https://api.github.com/repos/cyclus/cyclus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cyclus/cyclus/labels{/name}","releases_url":"https://api.github.com/repos/cyclus/cyclus/releases{/id}","deployments_url":"https://api.github.com/repos/cyclus/cyclus/deployments","created_at":"2012-01-30T21:16:54Z","updated_at":"2016-04-14T21:42:07Z","pushed_at":"2016-05-18T14:25:20Z","git_url":"git://github.com/cyclus/cyclus.git","ssh_url":"git@github.com:cyclus/cyclus.git","clone_url":"https://github.com/cyclus/cyclus.git","svn_url":"https://github.com/cyclus/cyclus","homepage":"http://fuelcycle.org/","size":38086,"stargazers_count":22,"watchers_count":22,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":32,"mirror_url":null,"open_issues_count":56,"forks":32,"open_issues":56,"watchers":22,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/cyclus/cyclus/pulls/1253"},"html":{"href":"https://github.com/cyclus/cyclus/pull/1253"},"issue":{"href":"https://api.github.com/repos/cyclus/cyclus/issues/1253"},"comments":{"href":"https://api.github.com/repos/cyclus/cyclus/issues/1253/comments"},"review_comments":{"href":"https://api.github.com/repos/cyclus/cyclus/pulls/1253/comments"},"review_comment":{"href":"https://api.github.com/repos/cyclus/cyclus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cyclus/cyclus/pulls/1253/commits"},"statuses":{"href":"https://api.github.com/repos/cyclus/cyclus/statuses/355be7301e3f8c112ebb685042c26474b7d236e3"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"rwcarlsen","id":1351242,"avatar_url":"https://avatars.githubusercontent.com/u/1351242?v=3","gravatar_id":"","url":"https://api.github.com/users/rwcarlsen","html_url":"https://github.com/rwcarlsen","followers_url":"https://api.github.com/users/rwcarlsen/followers","following_url":"https://api.github.com/users/rwcarlsen/following{/other_user}","gists_url":"https://api.github.com/users/rwcarlsen/gists{/gist_id}","starred_url":"https://api.github.com/users/rwcarlsen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwcarlsen/subscriptions","organizations_url":"https://api.github.com/users/rwcarlsen/orgs","repos_url":"https://api.github.com/users/rwcarlsen/repos","events_url":"https://api.github.com/users/rwcarlsen/events{/privacy}","received_events_url":"https://api.github.com/users/rwcarlsen/received_events","type":"User","site_admin":false},"comments":3,"review_comments":0,"commits":2,"additions":77,"deletions":73,"changed_files":3}}