HpxChannels Registration fails for written out template types
Expected Behavior
It shouldn't make a difference whether I am setting a registering a channel using a typedef or writing out the type myself
Actual Behavior
However, this compiles
typedef std::vector<int> VecInt;
HPX_REGISTER_CHANNEL(VecInt);
whereas writing out the vector will not.
HPX_REGISTER_CHANNEL(std::vector<int>);
Compilation error , Click to expand!
CMakeFiles/template_channel.dir/template_channel.cpp.o
/usr/bin/c++ -DHPX_APPLICATION_EXPORTS -DHPX_APPLICATION_NAME_DEFAULT=template_channel -DHPX_PREFIX_DEFAULT=\"/home/jn98zk/cpp_stuff/hpx-1.7.1/installation\" -DSPDLOG_COMPILED_LIB -isystem /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include -isystem /home/jn98zk/cpp_stuff/boost_1_79_0/installation/include -isystem /home/jn98zk/cpp_stuff/asio-1.22.1/installation/include -isystem /home/jn98zk/cpp_stuff/hwloc-2.7.1/installation/include -isystem /home/jn98zk/cpp_stuff/jemalloc-5.2.1/installation/include -isystem /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -isystem /usr/lib/x86_64-linux-gnu/openmpi/include -isystem /home/jn98zk/cpp_stuff/spdlog-1.10.0/installation/include -O2 -g -DNDEBUG -pthread -std=gnu++17 -MD -MT CMakeFiles/template_channel.dir/template_channel.cpp.o -MF CMakeFiles/template_channel.dir/template_channel.cpp.o.d -o CMakeFiles/template_channel.dir/template_channel.cpp.o -c /home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp
In file included from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/config/version.hpp:17,
from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/config/deprecation.hpp:11,
from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/config.hpp:33,
from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/include/actions.hpp:10,
from /home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:1:
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:37: error: pasting ">" and "std" does not give a valid preprocessing token
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:37: error: pasting ">" and "std" does not give a valid preprocessing token
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:37: error: pasting ">" and "_factory_data_12" does not give a valid preprocessing token
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^
In file included from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/runtime_components/component_factory.hpp:45,
from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/include/components.hpp:15,
from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/iostream.hpp:13,
from /home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:5:
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:37: error: pasting ">" and "_component_registry_type" does not give a valid preprocessing token
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:37: error: pasting ">" and "_component_registry_type" does not give a valid preprocessing token
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^
In file included from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/config/version.hpp:17,
from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/config/deprecation.hpp:11,
from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/config.hpp:33,
from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/include/actions.hpp:10,
from /home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:1:
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:37: error: pasting ">" and "std" does not give a valid preprocessing token
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:37: error: pasting ">" and "std" does not give a valid preprocessing token
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:37: error: pasting ">" and "std" does not give a valid preprocessing token
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:37: error: pasting ">" and "component_tag" does not give a valid preprocessing token
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:37: error: pasting ">" and "component_tag" does not give a valid preprocessing token
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:37: error: pasting ">" and "component_tag" does not give a valid preprocessing token
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:37: error: pasting ">" and "component_tag" does not give a valid preprocessing token
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:37: error: pasting ">" and "component_tag" does not give a valid preprocessing token
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:37: error: pasting ">" and "component_tag" does not give a valid preprocessing token
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^
In file included from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/config/deprecation.hpp:13,
from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/config.hpp:33,
from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/include/actions.hpp:10,
from /home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:1:
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: ‘__channel_std’ has not been declared
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:33: error: expected ‘;’ before ‘<’ token
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:33: error: expected unqualified-id before ‘<’ token
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: ‘__channel_component_std’ has not been declared
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:33: error: expected ‘;’ before ‘<’ token
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:33: error: expected unqualified-id before ‘<’ token
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: ‘__channel_component_std’ does not name a type
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: ‘init_registry_factory_static___channel_component_std’ has not been declared
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:33: error: expected unqualified-id before ‘<’ token
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: ‘__channel_component_std’ does not name a type
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: ‘__channel_component_std’ was not declared in this scope
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: parse error in template argument list
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: template-id ‘get_component_name<<expression error> >’ for ‘constexpr const char* hpx::components::get_component_name()’ does not match any template declaration
In file included from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/actions_base/basic_action.hpp:30,
from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/actions_base/component_action.hpp:12,
from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/include/actions.hpp:14,
from /home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:1:
/home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/components_base/component_type.hpp:182:27: note: candidate is: ‘template<class Component, class Enable> constexpr const char* hpx::components::get_component_name()’
182 | constexpr char const* get_component_name() noexcept;
| ^~~~~~~~~~~~~~~~~~
In file included from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/config/deprecation.hpp:13,
from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/config.hpp:33,
from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/include/actions.hpp:10,
from /home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:1:
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: ‘__channel_component_std’ was not declared in this scope
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: parse error in template argument list
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: template-id ‘get_component_base_name<<expression error> >’ for ‘constexpr const char* hpx::components::get_component_base_name()’ does not match any template declaration
In file included from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/actions_base/basic_action.hpp:30,
from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/actions_base/component_action.hpp:12,
from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/include/actions.hpp:14,
from /home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:1:
/home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/components_base/component_type.hpp:187:27: note: candidate is: ‘template<class Component, class Enable> constexpr const char* hpx::components::get_component_base_name()’
187 | constexpr const char* get_component_base_name() noexcept;
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/config/deprecation.hpp:13,
from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/config.hpp:33,
from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/include/actions.hpp:10,
from /home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:1:
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: ‘__channel_component_std’ was not declared in this scope
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: wrong number of template arguments (1, should be 2)
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
In file included from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/runtime_components/component_factory.hpp:45,
from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/include/components.hpp:15,
from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/iostream.hpp:13,
from /home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:5:
/home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/runtime_components/component_registry.hpp:46:12: note: provided for ‘template<class Component, hpx::components::factory_state_enum state> struct hpx::components::component_registry’
46 | struct component_registry : component_registry_base
| ^~~~~~~~~~~~~~~~~~
In file included from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/config/deprecation.hpp:13,
from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/config.hpp:33,
from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/include/actions.hpp:10,
from /home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:1:
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: ‘__channel_component_std’ has not been declared
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:33: error: expected initializer before ‘<’ token
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: ‘hpx_plugin_exporter_registry_hpx___channel_component_std’ has not been declared
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:33: error: expected unqualified-id before ‘<’ token
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: ‘hpx_plugin_exporter_instance_registry_hpx___channel_component_std’ does not name a type
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: ‘__channel_component_std’ was not declared in this scope
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: wrong number of template arguments (1, should be 2)
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
In file included from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/runtime_components/component_factory.hpp:45,
from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/include/components.hpp:15,
from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/iostream.hpp:13,
from /home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:5:
/home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/runtime_components/component_registry.hpp:46:12: note: provided for ‘template<class Component, hpx::components::factory_state_enum state> struct hpx::components::component_registry’
46 | struct component_registry : component_registry_base
| ^~~~~~~~~~~~~~~~~~
In file included from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/config/deprecation.hpp:13,
from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/config.hpp:33,
from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/include/actions.hpp:10,
from /home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:1:
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: ‘__channel_component_std’ was not declared in this scope
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: template argument 1 is invalid
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: ‘get’ is not a template function
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: ‘__channel_component_std’ was not declared in this scope
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: template argument 1 is invalid
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: ‘set’ is not a template function
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: ‘base_lco_with_value_std’ has not been declared
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:33: error: expected initializer before ‘<’ token
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: ‘base_lco_with_value_std’ was not declared in this scope; did you mean ‘base_lco_with_value_id_set’?
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: parse error in template argument list
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: template-id ‘get_action_name<<expression error> >’ for ‘const char* hpx::actions::detail::get_action_name()’ does not match any template declaration
In file included from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/actions/apply_helper.hpp:12,
from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/actions/transfer_action.hpp:14,
from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/include/actions.hpp:13,
from /home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:1:
/home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/actions_base/actions_base_support.hpp:97:17: note: candidate is: ‘template<class Action> const char* hpx::actions::detail::get_action_name()’
97 | char const* get_action_name()
| ^~~~~~~~~~~~~~~
In file included from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/config/deprecation.hpp:13,
from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/config.hpp:33,
from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/include/actions.hpp:10,
from /home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:1:
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: ‘base_lco_with_value_std’ was not declared in this scope; did you mean ‘base_lco_with_value_id_set’?
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: template argument 1 is invalid
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: ‘base_lco_with_value_std’ was not declared in this scope; did you mean ‘base_lco_with_value_id_set’?
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: template argument 1 is invalid
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: ‘instance’ is not a template function
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: ‘base_lco_with_value_std’ was not declared in this scope; did you mean ‘base_lco_with_value_id_set’?
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: template argument 1 is invalid
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: ‘base_lco_with_value_std’ was not declared in this scope; did you mean ‘base_lco_with_value_id_set’?
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: template argument 1 is invalid
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: ‘base_lco_with_value_std’ was not declared in this scope; did you mean ‘base_lco_with_value_id_set’?
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: parse error in template argument list
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: template-id ‘get_action_name<<expression error> >’ for ‘const char* hpx::actions::detail::get_action_name()’ does not match any template declaration
In file included from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/actions/apply_helper.hpp:12,
from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/actions/transfer_action.hpp:14,
from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/include/actions.hpp:13,
from /home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:1:
/home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/actions_base/actions_base_support.hpp:97:17: note: candidate is: ‘template<class Action> const char* hpx::actions::detail::get_action_name()’
97 | char const* get_action_name()
| ^~~~~~~~~~~~~~~
In file included from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/config/deprecation.hpp:13,
from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/config.hpp:33,
from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/include/actions.hpp:10,
from /home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:1:
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: ‘base_lco_with_value_std’ was not declared in this scope; did you mean ‘base_lco_with_value_id_set’?
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: template argument 1 is invalid
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: ‘base_lco_with_value_std’ was not declared in this scope; did you mean ‘base_lco_with_value_id_set’?
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: template argument 1 is invalid
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: ‘instance’ is not a template function
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: ‘base_lco_with_value_std’ was not declared in this scope; did you mean ‘base_lco_with_value_id_set’?
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: template argument 1 is invalid
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: ‘base_lco_with_value_std’ was not declared in this scope; did you mean ‘base_lco_with_value_id_set’?
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: template argument 1 is invalid
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: ‘base_lco_with_value_std’ was not declared in this scope
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: parse error in template argument list
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: template-id ‘get_action_coalescing_name<<expression error> >’ for ‘const char* hpx::parcelset::get_action_coalescing_name()’ does not match any template declaration
In file included from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/async_distributed/base_lco.hpp:20,
from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/async_distributed/base_lco_with_value.hpp:14,
from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/include/actions.hpp:17,
from /home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:1:
/home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/plugins/parcel/coalescing_message_handler_registration.hpp:32:44: note: candidate is: ‘template<class Action> const char* hpx::parcelset::get_action_coalescing_name()’
32 | template <typename Action> char const* get_action_coalescing_name();
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/config/deprecation.hpp:13,
from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/config.hpp:33,
from /home/jn98zk/cpp_stuff/hpx-1.7.1/installation/include/hpx/include/actions.hpp:10,
from /home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:1:
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: ‘base_lco_with_value_std’ was not declared in this scope
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: template argument 1 is invalid
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: ‘base_lco_with_value_std’ was not declared in this scope
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: template argument 1 is invalid
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
| ^~~~~~~~~~~~~~~~~~~~
/home/jn98zk/CLionProjects/HelloHPX/template_channel.cpp:12:1: error: ‘instance_’ is not a template function
12 | HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
Steps to Reproduce the Problem
Minimal Code Sample, click to expand
#include <hpx/include/actions.hpp>
#include <hpx/serialization.hpp>
#include <hpx/format.hpp>
#include <hpx/hpx_main.hpp>
#include <hpx/iostream.hpp>
#include <utility>
#include <hpx/channel.hpp>
typedef std::vector<int> VecInt;
//HPX_REGISTER_CHANNEL(VecInt); // Works
HPX_REGISTER_CHANNEL(std::vector<int>); // Doesn't work
void send_int_vector() {
hpx::distributed::channel<VecInt> noisy_channel;
noisy_channel.connect_to("Channel");
auto data = noisy_channel.get().get();
std::cout<<data[0];
}
HPX_PLAIN_ACTION(send_int_vector)
// Needs 2 localities to run
int main(int argc, char *argv[]) {
VecInt a{1,2,3};
hpx::distributed::channel<VecInt> num_channel(hpx::find_here());
num_channel.register_as("Channel");
num_channel.set(hpx::launch::sync,std::move(a));
send_int_vector_action action;
hpx::sync(action,hpx::find_remote_localities()[0]);
}
... Please describe your environment
- HPX Version: 1.8.0
- Platform (compiler, OS): gcc, linux mint
Yes, this is expected behavior. Not sure if we can do anything about this, I'll have a look.
Yes, this is expected behavior. Not sure if we can do anything about this, I'll have a look.
To explain, the macro argument is used in places where a 'C'-style identifier is expected, thus anything containing non-ascii or non-numeric characters will fail to compile.
If it's intended behavior, I would update the channels documentation to add this as a note for future users.
Should we close this now?
Should we close this now?
We still need to add this to the documentation...
@dimitraka Could you please add what John mentioned to the documentation? @hkaiser though from what I see that HPX_REGISTER_CHANNEL is not documented at all.
@hkaiser though from what I see that
HPX_REGISTER_CHANNELis not documented at all.
Yes, that's the reason why the comment above has not made it in yet.
We will remove the macro HPX_REGISTER_CHANNEL completely.