{"action":"created","comment":{"url":"https://api.github.com/repos/dealii/dealii/pulls/comments/39030970","id":39030970,"diff_hunk":"@@ -81,294 +109,79 @@ class TableIndicesBase\n };\n \n \n-/**\n- * Array of indices of fixed size used for the TableBase class.\n- *\n- * This is the general template, and has no implementation. There are a number\n- * of specializations that are actually implemented (one for each used value\n- * of <tt>N</tt>), which only differ in the way they implement their\n- * constructors (they take <tt>N</tt> arguments, something that cannot be\n- * represented by a general template). Actual storage of and access to data is\n- * done by the TableIndicesBase base class of a specializations.\n- *\n- * @ingroup data\n- * @author Wolfgang Bangerth, 2002\n- */\n-template <int N>\n-class TableIndices : public TableIndicesBase<N>\n-{\n-  /**\n-   * Standard constructor, setting all indices to zero.\n-   */\n-  TableIndices();\n-  /**\n-   * The actual constructor, taking @p N arguments of type <tt>unsigned\n-   * int</tt> to initialize the index object.\n-   */\n-  TableIndices(...);\n-};\n-\n-\n-\n-/**\n- * Array of indices of fixed size used for the TableBase class.\n- *\n- * This is the specialization for a one-dimensional table, i.e. a vector. This\n- * class only differs in the non-default constructors from the other\n- * specializations. Actual storage of and access to data is done by the\n- * TableIndicesBase base class of a specializations.\n- *\n- * @ingroup data\n- * @author Wolfgang Bangerth, 2002\n- */\n-template <>\n-class TableIndices<1> : public TableIndicesBase<1>\n-{\n-public:\n-  /**\n-   * Default constructor. Set all indices to zero.\n-   */\n-  TableIndices ();\n-\n-  /**\n-   * Constructor. Set indices to the given values.\n-   */\n-  TableIndices (const unsigned int index1);\n-};\n-\n-//TODO: Remove the default arguments and trickery below and put all\n-//the constructors into the class template\n-\n-/**\n- * Array of indices of fixed size used for the TableBase class.\n- *\n- * This is the specialization for a two-dimensional table. This class only\n- * differs in the non-default constructors from the other specializations.\n- * Actual storage of and access to data is done by the TableIndicesBase base\n- * class of a specializations.\n- *\n- * @ingroup data\n- * @author Wolfgang Bangerth, 2002\n- */\n-template <>\n-class TableIndices<2> : public TableIndicesBase<2>\n-{\n-public:\n-  /**\n-   * Default constructor. Set all indices to zero.\n-   */\n-  TableIndices ();\n-\n-  /**\n-   * Constructor. Set indices to the given values.\n-   *\n-   * The default values for the second and subsequent arguments are necessary\n-   * for some neat template tricks in SymmetricTensor where we only want to\n-   * set the first index and construct the subsequent ones later on, i.e. for\n-   * the moment we don't care about the later indices.\n-   */\n-  TableIndices (const unsigned int index1,\n-                const unsigned int index2 = numbers::invalid_unsigned_int);\n-};\n-\n-\n \n-/**\n- * Array of indices of fixed size used for the TableBase class.\n- *\n- * This is the specialization for a three-dimensional table. This class only\n- * differs in the non-default constructors from the other specializations.\n- * Actual storage of and access to data is done by the TableIndicesBase base\n- * class of a specializations.\n- *\n- * @ingroup data\n- * @author Wolfgang Bangerth, 2002\n- */\n-template <>\n-class TableIndices<3> : public TableIndicesBase<3>\n-{\n-public:\n-  /**\n-   * Default constructor. Set all indices to zero.\n-   */\n-  TableIndices ();\n-\n-  /**\n-   * Constructor. Set indices to the given values.\n-   *\n-   * The default values for the second and subsequent arguments are necessary\n-   * for some neat template tricks in SymmetricTensor where we only want to\n-   * set the first index and construct the subsequent ones later on, i.e. for\n-   * the moment we don't care about the later indices.\n-   */\n-  TableIndices (const unsigned int index1,\n-                const unsigned int index2 = numbers::invalid_unsigned_int,\n-                const unsigned int index3 = numbers::invalid_unsigned_int);\n-};\n-\n-\n-/**\n- * Array of indices of fixed size used for the TableBase class.\n- *\n- * This is the specialization for a four-dimensional table. This class only\n- * differs in the non-default constructors from the other specializations.\n- * Actual storage of and access to data is done by the TableIndicesBase base\n- * class of a specializations.\n- *\n- * @ingroup data\n- * @author Wolfgang Bangerth, Ralf Hartmann 2002\n- */\n-template <>\n-class TableIndices<4> : public TableIndicesBase<4>\n-{\n-public:\n-  /**\n-   * Default constructor. Set all indices to zero.\n-   */\n-  TableIndices ();\n-\n-  /**\n-   * Constructor. Set indices to the given values.\n-   *\n-   * The default values for the second and subsequent arguments are necessary\n-   * for some neat template tricks in SymmetricTensor where we only want to\n-   * set the first index and construct the subsequent ones later on, i.e. for\n-   * the moment we don't care about the later indices.\n-   */\n-  TableIndices (const unsigned int index1,\n-                const unsigned int index2 = numbers::invalid_unsigned_int,\n-                const unsigned int index3 = numbers::invalid_unsigned_int,\n-                const unsigned int index4 = numbers::invalid_unsigned_int);\n-};\n-\n-\n-/**\n- * Array of indices of fixed size used for the TableBase class.\n- *\n- * This is the specialization for a five-dimensional table. This class only\n- * differs in the non-default constructors from the other specializations.\n- * Actual storage of and access to data is done by the TableIndicesBase base\n- * class of a specializations.\n- *\n- * @ingroup data\n- * @author Wolfgang Bangerth, Ralf Hartmann 2002\n- */\n-template <>\n-class TableIndices<5> : public TableIndicesBase<5>\n-{\n-public:\n-  /**\n-   * Default constructor. Set all indices to zero.\n-   */\n-  TableIndices ();\n-\n-  /**\n-   * Constructor. Set indices to the given values.\n-   *\n-   * The default values for the second and subsequent arguments are necessary\n-   * for some neat template tricks in SymmetricTensor where we only want to\n-   * set the first index and construct the subsequent ones later on, i.e. for\n-   * the moment we don't care about the later indices.\n-   */\n-  TableIndices (const unsigned int index1,\n-                const unsigned int index2 = numbers::invalid_unsigned_int,\n-                const unsigned int index3 = numbers::invalid_unsigned_int,\n-                const unsigned int index4 = numbers::invalid_unsigned_int,\n-                const unsigned int index5 = numbers::invalid_unsigned_int);\n-};\n+/* --------------------- Template and inline functions ---------------- */\n \n \n-/**\n- * Array of indices of fixed size used for the TableBase class.\n- *\n- * This is the specialization for a six-dimensional table. This class only\n- * differs in the non-default constructors from the other specializations.\n- * Actual storage of and access to data is done by the TableIndicesBase base\n- * class of a specializations.\n- *\n- * @ingroup data\n- * @author Wolfgang Bangerth, Ralf Hartmann 2002\n- */\n-template <>\n-class TableIndices<6> : public TableIndicesBase<6>\n+template <int N>\n+TableIndices<N>::TableIndices()\n {\n-public:\n-  /**\n-   * Default constructor. Set all indices to zero.\n-   */\n-  TableIndices ();\n+  Assert (N != 0, ExcMessage(\"Cannot create a TableIndices object of size 0\"));","path":"include/deal.II/base/table_indices.h","position":304,"original_position":304,"commit_id":"64ec8b623a4b45b6f4d785a251204ec054b97ebf","original_commit_id":"64ec8b623a4b45b6f4d785a251204ec054b97ebf","user":{"login":"bangerth","id":7504421,"avatar_url":"https://avatars.githubusercontent.com/u/7504421?v=3","gravatar_id":"","url":"https://api.github.com/users/bangerth","html_url":"https://github.com/bangerth","followers_url":"https://api.github.com/users/bangerth/followers","following_url":"https://api.github.com/users/bangerth/following{/other_user}","gists_url":"https://api.github.com/users/bangerth/gists{/gist_id}","starred_url":"https://api.github.com/users/bangerth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bangerth/subscriptions","organizations_url":"https://api.github.com/users/bangerth/orgs","repos_url":"https://api.github.com/users/bangerth/repos","events_url":"https://api.github.com/users/bangerth/events{/privacy}","received_events_url":"https://api.github.com/users/bangerth/received_events","type":"User","site_admin":false},"body":"I think you want to change this to `N>0` to also rule out negatives. In practice, I'm sure you get all sorts of compiler errors before you're even allowed to call this function (and get the run-time exception) so it may or may not matter whether we even have it.","created_at":"2015-09-09T11:23:27Z","updated_at":"2015-09-09T11:23:27Z","html_url":"https://github.com/dealii/dealii/pull/1562#discussion_r39030970","pull_request_url":"https://api.github.com/repos/dealii/dealii/pulls/1562","_links":{"self":{"href":"https://api.github.com/repos/dealii/dealii/pulls/comments/39030970"},"html":{"href":"https://github.com/dealii/dealii/pull/1562#discussion_r39030970"},"pull_request":{"href":"https://api.github.com/repos/dealii/dealii/pulls/1562"}}},"pull_request":{"url":"https://api.github.com/repos/dealii/dealii/pulls/1562","id":44506724,"html_url":"https://github.com/dealii/dealii/pull/1562","diff_url":"https://github.com/dealii/dealii/pull/1562.diff","patch_url":"https://github.com/dealii/dealii/pull/1562.patch","issue_url":"https://api.github.com/repos/dealii/dealii/issues/1562","number":1562,"state":"open","locked":false,"title":"TableIndices: Cleanup","user":{"login":"tamiko","id":3432917,"avatar_url":"https://avatars.githubusercontent.com/u/3432917?v=3","gravatar_id":"","url":"https://api.github.com/users/tamiko","html_url":"https://github.com/tamiko","followers_url":"https://api.github.com/users/tamiko/followers","following_url":"https://api.github.com/users/tamiko/following{/other_user}","gists_url":"https://api.github.com/users/tamiko/gists{/gist_id}","starred_url":"https://api.github.com/users/tamiko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tamiko/subscriptions","organizations_url":"https://api.github.com/users/tamiko/orgs","repos_url":"https://api.github.com/users/tamiko/repos","events_url":"https://api.github.com/users/tamiko/events{/privacy}","received_events_url":"https://api.github.com/users/tamiko/received_events","type":"User","site_admin":false},"body":"This is a major cleanup:\n\n - remove all template specializations\n - also remove the base class\n - implement one convenience constructor that takes care of everything","created_at":"2015-09-09T03:18:46Z","updated_at":"2015-09-09T11:23:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"203d1b7254ac0ca6cba1bba74d7a93b48b3ab5ca","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dealii/dealii/pulls/1562/commits","review_comments_url":"https://api.github.com/repos/dealii/dealii/pulls/1562/comments","review_comment_url":"https://api.github.com/repos/dealii/dealii/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dealii/dealii/issues/1562/comments","statuses_url":"https://api.github.com/repos/dealii/dealii/statuses/64ec8b623a4b45b6f4d785a251204ec054b97ebf","head":{"label":"tamiko:fix_table_indices","ref":"fix_table_indices","sha":"64ec8b623a4b45b6f4d785a251204ec054b97ebf","user":{"login":"tamiko","id":3432917,"avatar_url":"https://avatars.githubusercontent.com/u/3432917?v=3","gravatar_id":"","url":"https://api.github.com/users/tamiko","html_url":"https://github.com/tamiko","followers_url":"https://api.github.com/users/tamiko/followers","following_url":"https://api.github.com/users/tamiko/following{/other_user}","gists_url":"https://api.github.com/users/tamiko/gists{/gist_id}","starred_url":"https://api.github.com/users/tamiko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tamiko/subscriptions","organizations_url":"https://api.github.com/users/tamiko/orgs","repos_url":"https://api.github.com/users/tamiko/repos","events_url":"https://api.github.com/users/tamiko/events{/privacy}","received_events_url":"https://api.github.com/users/tamiko/received_events","type":"User","site_admin":false},"repo":{"id":22046756,"name":"dealii","full_name":"tamiko/dealii","owner":{"login":"tamiko","id":3432917,"avatar_url":"https://avatars.githubusercontent.com/u/3432917?v=3","gravatar_id":"","url":"https://api.github.com/users/tamiko","html_url":"https://github.com/tamiko","followers_url":"https://api.github.com/users/tamiko/followers","following_url":"https://api.github.com/users/tamiko/following{/other_user}","gists_url":"https://api.github.com/users/tamiko/gists{/gist_id}","starred_url":"https://api.github.com/users/tamiko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tamiko/subscriptions","organizations_url":"https://api.github.com/users/tamiko/orgs","repos_url":"https://api.github.com/users/tamiko/repos","events_url":"https://api.github.com/users/tamiko/events{/privacy}","received_events_url":"https://api.github.com/users/tamiko/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tamiko/dealii","description":"","fork":true,"url":"https://api.github.com/repos/tamiko/dealii","forks_url":"https://api.github.com/repos/tamiko/dealii/forks","keys_url":"https://api.github.com/repos/tamiko/dealii/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tamiko/dealii/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tamiko/dealii/teams","hooks_url":"https://api.github.com/repos/tamiko/dealii/hooks","issue_events_url":"https://api.github.com/repos/tamiko/dealii/issues/events{/number}","events_url":"https://api.github.com/repos/tamiko/dealii/events","assignees_url":"https://api.github.com/repos/tamiko/dealii/assignees{/user}","branches_url":"https://api.github.com/repos/tamiko/dealii/branches{/branch}","tags_url":"https://api.github.com/repos/tamiko/dealii/tags","blobs_url":"https://api.github.com/repos/tamiko/dealii/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tamiko/dealii/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tamiko/dealii/git/refs{/sha}","trees_url":"https://api.github.com/repos/tamiko/dealii/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tamiko/dealii/statuses/{sha}","languages_url":"https://api.github.com/repos/tamiko/dealii/languages","stargazers_url":"https://api.github.com/repos/tamiko/dealii/stargazers","contributors_url":"https://api.github.com/repos/tamiko/dealii/contributors","subscribers_url":"https://api.github.com/repos/tamiko/dealii/subscribers","subscription_url":"https://api.github.com/repos/tamiko/dealii/subscription","commits_url":"https://api.github.com/repos/tamiko/dealii/commits{/sha}","git_commits_url":"https://api.github.com/repos/tamiko/dealii/git/commits{/sha}","comments_url":"https://api.github.com/repos/tamiko/dealii/comments{/number}","issue_comment_url":"https://api.github.com/repos/tamiko/dealii/issues/comments{/number}","contents_url":"https://api.github.com/repos/tamiko/dealii/contents/{+path}","compare_url":"https://api.github.com/repos/tamiko/dealii/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tamiko/dealii/merges","archive_url":"https://api.github.com/repos/tamiko/dealii/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tamiko/dealii/downloads","issues_url":"https://api.github.com/repos/tamiko/dealii/issues{/number}","pulls_url":"https://api.github.com/repos/tamiko/dealii/pulls{/number}","milestones_url":"https://api.github.com/repos/tamiko/dealii/milestones{/number}","notifications_url":"https://api.github.com/repos/tamiko/dealii/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tamiko/dealii/labels{/name}","releases_url":"https://api.github.com/repos/tamiko/dealii/releases{/id}","created_at":"2014-07-21T00:21:17Z","updated_at":"2015-05-07T08:20:43Z","pushed_at":"2015-09-09T04:42:29Z","git_url":"git://github.com/tamiko/dealii.git","ssh_url":"git@github.com:tamiko/dealii.git","clone_url":"https://github.com/tamiko/dealii.git","svn_url":"https://github.com/tamiko/dealii","homepage":null,"size":126547,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dealii:master","ref":"master","sha":"076c1b07073c82c292768c6bdcd0f891e07a6aca","user":{"login":"dealii","id":7506070,"avatar_url":"https://avatars.githubusercontent.com/u/7506070?v=3","gravatar_id":"","url":"https://api.github.com/users/dealii","html_url":"https://github.com/dealii","followers_url":"https://api.github.com/users/dealii/followers","following_url":"https://api.github.com/users/dealii/following{/other_user}","gists_url":"https://api.github.com/users/dealii/gists{/gist_id}","starred_url":"https://api.github.com/users/dealii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dealii/subscriptions","organizations_url":"https://api.github.com/users/dealii/orgs","repos_url":"https://api.github.com/users/dealii/repos","events_url":"https://api.github.com/users/dealii/events{/privacy}","received_events_url":"https://api.github.com/users/dealii/received_events","type":"Organization","site_admin":false},"repo":{"id":21943980,"name":"dealii","full_name":"dealii/dealii","owner":{"login":"dealii","id":7506070,"avatar_url":"https://avatars.githubusercontent.com/u/7506070?v=3","gravatar_id":"","url":"https://api.github.com/users/dealii","html_url":"https://github.com/dealii","followers_url":"https://api.github.com/users/dealii/followers","following_url":"https://api.github.com/users/dealii/following{/other_user}","gists_url":"https://api.github.com/users/dealii/gists{/gist_id}","starred_url":"https://api.github.com/users/dealii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dealii/subscriptions","organizations_url":"https://api.github.com/users/dealii/orgs","repos_url":"https://api.github.com/users/dealii/repos","events_url":"https://api.github.com/users/dealii/events{/privacy}","received_events_url":"https://api.github.com/users/dealii/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dealii/dealii","description":"The development repository for the deal.II finite element library.","fork":false,"url":"https://api.github.com/repos/dealii/dealii","forks_url":"https://api.github.com/repos/dealii/dealii/forks","keys_url":"https://api.github.com/repos/dealii/dealii/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dealii/dealii/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dealii/dealii/teams","hooks_url":"https://api.github.com/repos/dealii/dealii/hooks","issue_events_url":"https://api.github.com/repos/dealii/dealii/issues/events{/number}","events_url":"https://api.github.com/repos/dealii/dealii/events","assignees_url":"https://api.github.com/repos/dealii/dealii/assignees{/user}","branches_url":"https://api.github.com/repos/dealii/dealii/branches{/branch}","tags_url":"https://api.github.com/repos/dealii/dealii/tags","blobs_url":"https://api.github.com/repos/dealii/dealii/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dealii/dealii/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dealii/dealii/git/refs{/sha}","trees_url":"https://api.github.com/repos/dealii/dealii/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dealii/dealii/statuses/{sha}","languages_url":"https://api.github.com/repos/dealii/dealii/languages","stargazers_url":"https://api.github.com/repos/dealii/dealii/stargazers","contributors_url":"https://api.github.com/repos/dealii/dealii/contributors","subscribers_url":"https://api.github.com/repos/dealii/dealii/subscribers","subscription_url":"https://api.github.com/repos/dealii/dealii/subscription","commits_url":"https://api.github.com/repos/dealii/dealii/commits{/sha}","git_commits_url":"https://api.github.com/repos/dealii/dealii/git/commits{/sha}","comments_url":"https://api.github.com/repos/dealii/dealii/comments{/number}","issue_comment_url":"https://api.github.com/repos/dealii/dealii/issues/comments{/number}","contents_url":"https://api.github.com/repos/dealii/dealii/contents/{+path}","compare_url":"https://api.github.com/repos/dealii/dealii/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dealii/dealii/merges","archive_url":"https://api.github.com/repos/dealii/dealii/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dealii/dealii/downloads","issues_url":"https://api.github.com/repos/dealii/dealii/issues{/number}","pulls_url":"https://api.github.com/repos/dealii/dealii/pulls{/number}","milestones_url":"https://api.github.com/repos/dealii/dealii/milestones{/number}","notifications_url":"https://api.github.com/repos/dealii/dealii/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dealii/dealii/labels{/name}","releases_url":"https://api.github.com/repos/dealii/dealii/releases{/id}","created_at":"2014-07-17T14:00:26Z","updated_at":"2015-09-09T05:46:25Z","pushed_at":"2015-09-09T11:09:45Z","git_url":"git://github.com/dealii/dealii.git","ssh_url":"git@github.com:dealii/dealii.git","clone_url":"https://github.com/dealii/dealii.git","svn_url":"https://github.com/dealii/dealii","homepage":"http://www.dealii.org/","size":159991,"stargazers_count":83,"watchers_count":83,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":117,"mirror_url":null,"open_issues_count":124,"forks":117,"open_issues":124,"watchers":83,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dealii/dealii/pulls/1562"},"html":{"href":"https://github.com/dealii/dealii/pull/1562"},"issue":{"href":"https://api.github.com/repos/dealii/dealii/issues/1562"},"comments":{"href":"https://api.github.com/repos/dealii/dealii/issues/1562/comments"},"review_comments":{"href":"https://api.github.com/repos/dealii/dealii/pulls/1562/comments"},"review_comment":{"href":"https://api.github.com/repos/dealii/dealii/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dealii/dealii/pulls/1562/commits"},"statuses":{"href":"https://api.github.com/repos/dealii/dealii/statuses/64ec8b623a4b45b6f4d785a251204ec054b97ebf"}}}}