You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I find these errors when trying to compile with a Makefile that uses CXX = mpicxx and CXXFLAGS = -std=c++17 -Wall -Wextra -O3. mpicxx --version is: g++ (GCC) 8.5.0 20210514 (Red Hat 8.5.0-20). Are the errors raised by the version of the compiler? Thanks.
In file included from /tcga_data/include/mpl/mpl/mpl.hpp:51,
from vga_paramLayout_job.cpp:13:
/tcga_data/include/mpl/mpl/layout.hpp:383:17: error: expected unqualified-id before ‘[’ token
null_layout([[maybe_unused]] const null_layout &l) noexcept : null_layout() {
^
/tcga_data/include/mpl/mpl/layout.hpp:383:17: error: expected ‘)’ before ‘[’ token
null_layout([[maybe_unused]] const null_layout &l) noexcept : null_layout() {
~^
)
/tcga_data/include/mpl/mpl/layout.hpp:386:17: error: expected unqualified-id before ‘[’ token
null_layout([[maybe_unused]] null_layout &&l) noexcept : null_layout() {
^
/tcga_data/include/mpl/mpl/layout.hpp:386:17: error: expected ‘)’ before ‘[’ token
null_layout([[maybe_unused]] null_layout &&l) noexcept : null_layout() {
~^
)
In file included from /tcga_data/include/mpl/mpl/mpl.hpp:57,
from vga_paramLayout_job.cpp:13:
/tcga_data/include/mpl/mpl/comm_group.hpp:4059:27: error: expected unqualified-id before ‘[’ token
explicit communicator([[maybe_unused]] comm_collective_tag comm_collective,
^
/tcga_data/include/mpl/mpl/comm_group.hpp:4059:27: error: expected ‘)’ before ‘[’ token
explicit communicator([[maybe_unused]] comm_collective_tag comm_collective,
~^
)
/tcga_data/include/mpl/mpl/comm_group.hpp:4072:27: error: expected unqualified-id before ‘[’ token
explicit communicator([[maybe_unused]] group_collective_tag group_collective,
^
/tcga_data/include/mpl/mpl/comm_group.hpp:4072:27: error: expected ‘)’ before ‘[’ token
explicit communicator([[maybe_unused]] group_collective_tag group_collective,
~^
)
/tcga_data/include/mpl/mpl/comm_group.hpp:4073:89: error: expected unqualified-id before ‘)’ token
const communicator &other, const group &gr, tag_t t = tag_t{0}) {
^
/tcga_data/include/mpl/mpl/comm_group.hpp:4088:27: error: expected unqualified-id before ‘[’ token
explicit communicator([[maybe_unused]] split_tag split, const communicator &other,
^
/tcga_data/include/mpl/mpl/comm_group.hpp:4088:27: error: expected ‘)’ before ‘[’ token
explicit communicator([[maybe_unused]] split_tag split, const communicator &other,
~^
)
/tcga_data/include/mpl/mpl/comm_group.hpp:4107:27: error: expected unqualified-id before ‘[’ token
explicit communicator([[maybe_unused]] split_shared_memory_tag split_shared_memory,
^
/tcga_data/include/mpl/mpl/comm_group.hpp:4107:27: error: expected ‘)’ before ‘[’ token
explicit communicator([[maybe_unused]] split_shared_memory_tag split_shared_memory,
~^
)
The text was updated successfully, but these errors were encountered:
I understand the error message in the way that the compiler does not recognize the [[maybe_unused]] attribute, which is a C++17 feature. GCC is C++17 feature complete since version 8. This means your compiler GCC 8.5 should support [[maybe_unused]]. Though, GCC 8.5 uses C++14 by default. Thus I suspect that the compiler does not see the -std=c++17 option.
Can you please double check your Makefiles?
What happens if you add
#if __cplusplus < 201703L
#error "C++17 or better required\n"
#endif
I find these errors when trying to compile with a Makefile that uses CXX = mpicxx and CXXFLAGS = -std=c++17 -Wall -Wextra -O3. mpicxx --version is: g++ (GCC) 8.5.0 20210514 (Red Hat 8.5.0-20). Are the errors raised by the version of the compiler? Thanks.
In file included from /tcga_data/include/mpl/mpl/mpl.hpp:51,
from vga_paramLayout_job.cpp:13:
/tcga_data/include/mpl/mpl/layout.hpp:383:17: error: expected unqualified-id before ‘[’ token
null_layout([[maybe_unused]] const null_layout &l) noexcept : null_layout() {
^
/tcga_data/include/mpl/mpl/layout.hpp:383:17: error: expected ‘)’ before ‘[’ token
null_layout([[maybe_unused]] const null_layout &l) noexcept : null_layout() {
~^
)
/tcga_data/include/mpl/mpl/layout.hpp:386:17: error: expected unqualified-id before ‘[’ token
null_layout([[maybe_unused]] null_layout &&l) noexcept : null_layout() {
^
/tcga_data/include/mpl/mpl/layout.hpp:386:17: error: expected ‘)’ before ‘[’ token
null_layout([[maybe_unused]] null_layout &&l) noexcept : null_layout() {
~^
)
In file included from /tcga_data/include/mpl/mpl/mpl.hpp:57,
from vga_paramLayout_job.cpp:13:
/tcga_data/include/mpl/mpl/comm_group.hpp:4059:27: error: expected unqualified-id before ‘[’ token
explicit communicator([[maybe_unused]] comm_collective_tag comm_collective,
^
/tcga_data/include/mpl/mpl/comm_group.hpp:4059:27: error: expected ‘)’ before ‘[’ token
explicit communicator([[maybe_unused]] comm_collective_tag comm_collective,
~^
)
/tcga_data/include/mpl/mpl/comm_group.hpp:4072:27: error: expected unqualified-id before ‘[’ token
explicit communicator([[maybe_unused]] group_collective_tag group_collective,
^
/tcga_data/include/mpl/mpl/comm_group.hpp:4072:27: error: expected ‘)’ before ‘[’ token
explicit communicator([[maybe_unused]] group_collective_tag group_collective,
~^
)
/tcga_data/include/mpl/mpl/comm_group.hpp:4073:89: error: expected unqualified-id before ‘)’ token
const communicator &other, const group &gr, tag_t t = tag_t{0}) {
^
/tcga_data/include/mpl/mpl/comm_group.hpp:4088:27: error: expected unqualified-id before ‘[’ token
explicit communicator([[maybe_unused]] split_tag split, const communicator &other,
^
/tcga_data/include/mpl/mpl/comm_group.hpp:4088:27: error: expected ‘)’ before ‘[’ token
explicit communicator([[maybe_unused]] split_tag split, const communicator &other,
~^
)
/tcga_data/include/mpl/mpl/comm_group.hpp:4107:27: error: expected unqualified-id before ‘[’ token
explicit communicator([[maybe_unused]] split_shared_memory_tag split_shared_memory,
^
/tcga_data/include/mpl/mpl/comm_group.hpp:4107:27: error: expected ‘)’ before ‘[’ token
explicit communicator([[maybe_unused]] split_shared_memory_tag split_shared_memory,
~^
)
The text was updated successfully, but these errors were encountered: