Help get this topic noticed by sharing it on Twitter, Facebook, or email.

Question on ch-5 of Beginning C++ Programming Video

Hello:

I have a question about the Beginning C++ Programming Video.

While trying to repeat the hands-on exercise in Chapter 5 (the Farmers Market file), a make tests gives me the following compiling error:
mkdir -p build
g++ -static -std=c++11 -pthread -MMD -c main.cpp -o build/main.o -I /Users/abacolla/devel/cpp/googletest-release-1.7.0 -I /Users/abacolla/devel/cpp/googletest-release-1.7.0/include -I . -I ../src -I ../../../class-library/include
In file included from main.cpp:5:
./functions.hpp:14:36: error: non-local lambda expression cannot have a capture-default
constexpr auto aggregate = [&] (int row_num, const std::string& line) {
^
./functions.hpp:14:35: error: constexpr variable 'aggregate' must be initialized by a constant expression
constexpr auto aggregate = [&] (int row_num, const std::string& line) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
make: *** [build/main.o] Error 1

Is there any way I can get some help to fix this error and move on? (I use a Mac). Thanks,

Albino
albinobacolla@gmail.com
1 person has
this question
+1
Reply