Mac M1 C 20 Missing std convertible to and std forward iterator concepts

0 votes
I'm trying to build a rather large school project on a Mac M1, however I'm having trouble with several missing concepts.

The project was not designed with arm compilation in mind, but I'm looking into it to see whether it's doable.

The first stage was completed successfully: the configure script ran as expected and generated a Makefile.

The issue manifests itself during the compilation of some project files: clang appears to be missing several standard library ideas (c++20).

std::convertible to and std::forward iterator are two ideas that I'm missing.

After doing some investigation, I discovered that the apple version of clang for M1 processors does not completely implement all of the c++20 capabilities, which I believe is the source of my difficulty.

Is there another compiler for the AArch64 platform that incorporates more recent C++ capabilities, or should I give up now?
Jun 14 in C++ by Nicholas
• 2,460 points
4 views

1 answer to this question.

0 votes

Clang from Homebrew is a good option (or compile one by yourself). 

You may also look at the features that have been incorporated on Clang's official website.

❯ clang++ --version
Homebrew clang version 13.0.0
Target: arm64-apple-darwin21.1.0
Thread model: posix
InstalledDir: /opt/homebrew/opt/llvm/bin

❯ cat test.cpp
#include <concepts>
#include <iterator>
static_assert(std::convertible_to<char, int>);
static_assert(std::forward_iterator<char*>);

❯ clang++ -std=c++20 -c test.cpp

❯ 
answered Jun 14 by Damon
• 3,580 points

Related Questions In C++

0 votes
1 answer

The Definitive C++ Book Guide and List

For Beginner (includes those without coding experience) Programming: ...READ MORE

answered Jun 6 in C++ by pranav
• 2,320 points
21 views
0 votes
1 answer

std::greater on a an std::pair of a double and a class

std::greater is simply a wrapper for a ...READ MORE

answered Jun 2 in C++ by Damon
• 3,580 points
16 views
0 votes
1 answer

Cases of static and dynamic binding in C++

When an object's static type is used to associate it with a member function, this is known as static binding (understand the type of its class). When a pointer or reference is associated with a member function based on the dynamic type of the object, this is known as dynamic binding (understand the instance of the variable at runtime). Before continuing, keep in mind that dynamic binding only works with pointers, references, and virtual functions for the base class. Because everything needed to call the function is known at compile time, the first call is a static binding (also known as early binding). Derived1 d1(1, 10); d1.display_data(); You already know that the d1 instance is a Derived1 automatic variable, and that it will call the Derived1::display data method (). The first condition is incorrect: d1 is neither a pointer nor a reference. The second condition isn't acceptable:  There is no virtual Derived1::display data. The second call is for ...READ MORE

answered Jun 7 in C++ by Damon
• 3,580 points
14 views
0 votes
1 answer

functions in c++ call by value and call by reference

Calling a function by value copies the argument and stores it in a local variable for use by the function, so the argument is unaffected if the value of the local variable changes.  The argument is passed to the function as a reference rather than a copy, so if the function changes the value of the argument, the argument is also changed.   The void change(int); function prototype informs the compiler that there is a function named change that takes a single int argument and returns void (i.e. nothing).  Because there is no & with the argument, it is called by value.  You have the line change(orig); later in your code, which actually calls the function with. Take a look at the output of ...READ MORE

answered Jun 7 in C++ by Damon
• 3,580 points
18 views
0 votes
1 answer

setuptools: build shared libary from C++ code, then build Cython wrapper linked to shared libary

There is a seemingly undocumented feature of setup that ...READ MORE

answered Sep 11, 2018 in Python by Priyaj
• 58,080 points
190 views
0 votes
1 answer

setuptools: build shared libary from C++ code, then build Cython wrapper linked to shared libary

There is a seemingly undocumented feature of setup that ...READ MORE

answered Sep 21, 2018 in Python by Priyaj
• 58,080 points
1,372 views
0 votes
1 answer

How to pass large records to map/reduce tasks?

Hadoop is not designed for records about ...READ MORE

answered Sep 25, 2018 in Big Data Hadoop by Frankie
• 9,830 points
787 views
0 votes
1 answer

Invalid method parameters for eth_sendTransaction

params needs to be an array, try {"jsonrpc":"2.0","method":"eth_se ...READ MORE

answered Sep 28, 2018 in Blockchain by digger
• 26,720 points
582 views
0 votes
1 answer

What data structure is inside std::map in C++?

An associative container is std::map. The standard's ...READ MORE

answered May 31 in C++ by Damon
• 3,580 points
19 views
0 votes
1 answer

How to use std::sort to sort an array in C++

We receive std::begin and std::end in C++0x/11, which are overloaded for arrays: #include <algorithm> int main(){ int v[2000]; ...READ MORE

answered Jun 1 in C++ by Damon
• 3,580 points
15 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP