{"action":"closed","issue":{"url":"https://api.github.com/repos/philsquared/Catch/issues/518","labels_url":"https://api.github.com/repos/philsquared/Catch/issues/518/labels{/name}","comments_url":"https://api.github.com/repos/philsquared/Catch/issues/518/comments","events_url":"https://api.github.com/repos/philsquared/Catch/issues/518/events","html_url":"https://github.com/philsquared/Catch/issues/518","id":112078540,"number":518,"title":"REQUIRE macro can't take templates with more than one templated parameter","user":{"login":"chrisb2244","id":7201433,"avatar_url":"https://avatars.githubusercontent.com/u/7201433?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisb2244","html_url":"https://github.com/chrisb2244","followers_url":"https://api.github.com/users/chrisb2244/followers","following_url":"https://api.github.com/users/chrisb2244/following{/other_user}","gists_url":"https://api.github.com/users/chrisb2244/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisb2244/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisb2244/subscriptions","organizations_url":"https://api.github.com/users/chrisb2244/orgs","repos_url":"https://api.github.com/users/chrisb2244/repos","events_url":"https://api.github.com/users/chrisb2244/events{/privacy}","received_events_url":"https://api.github.com/users/chrisb2244/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-19T06:06:44Z","updated_at":"2015-10-19T08:39:11Z","closed_at":"2015-10-19T08:39:11Z","body":"The error messages are:\r\n\r\n**gcc**:\r\n\r\n    error: macro \"REQUIRE\" passed 2 arguments, but takes just 1\r\n    In function 'void ____C_A_T_C_H____T_E_S_T____311()'\r\n    'REQUIRE' was not declared in this scope\r\n        REQUIRE(myTemplateFct<int, double>());\r\n\r\nThe number changes but the output is similar.\r\n\r\n**clang**:\r\n\r\n    error: too many arguments provided to function-like macro invocation\r\n        REQUIRE(myTemplateFct<double, int>());\r\n    \r\n    /path/to/catch.hpp:9333:9: note: macro 'REQUIRE' defined here\r\n        #define REQUIRE( expr ) INTERNAL_CATCH_TEST( expr, Catch::ResultDisposition::Normal, \"REQUIRE\" )\r\n        ^\r\n    catchInc.cpp:8:5: error: use of undeclared identifier 'REQUIRE'\r\n        REQUIRE(myTemplateFct<double, int>());\r\n\r\n\r\nThe code to compile is:\r\n\r\n    #define CATCH_CONFIG_MAIN\r\n    #include <catch/catch.hpp>\r\n\r\n    template<typename T, typename U>\r\n    bool myTemplateFct() { return true; }\r\n    \r\n    TEST_CASE(\"Example\") {\r\n        REQUIRE(myTemplateFct<int, double>());\r\n    }\r\n\r\nOn the other hand, this does work:\r\n\r\n    TEST_CASE(\"Example\") {\r\n        bool a = myTemplateFct<int, double>();\r\n        REQUIRE(a);\r\n    }\r\n"}}