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
• 5,300 points
13 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
• 4,960 points

Related Questions In C++

0 votes
0 answers

What is the difference between std::list<std::pair> and std::map in C++ STL?

What distinguishes std::list<std::pair> from std::map? Does the ...READ MORE

2 days ago in C++ by Nicholas
• 5,300 points
4 views
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,580 points
43 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
• 4,960 points
34 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
• 4,960 points
24 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
206 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,418 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
810 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
642 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
• 4,960 points
37 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
• 4,960 points
40 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