$ git clone https://github.com/cparse/cparse.git
Cloning into 'cparse'...
remote: Enumerating objects: 1134, done.
remote: Total 1134 (delta 0), reused 0 (delta 0), pack-reused 1134
Receiving objects: 100% (1134/1134), 509.58 KiB | 2.01 MiB/s, done.
Resolving deltas: 100% (776/776), done.
$ cd cparse; git rev-parse HEAD
a9f26860283c2653f8a0fcb003cbb07f21b690af
$ make
c++ -std=c++11 -Wall -pedantic -Wmissing-field-initializers -Wuninitialized -g -c test-shunting-yard.cpp -o test-shunting-yard.o -g
In file included from test-shunting-yard.cpp:6:
In file included from ././shunting-yard.h:155:
././containers.h:38:1: warning: 'Iterator' defined as a struct here but previously declared as a class
[-Wmismatched-tags]
struct Iterator : public Iterable {
^
././containers.h:27:1: note: did you mean struct here?
class Iterator;
^~~~~
struct
././containers.h:63:1: warning: 'TokenMap' defined as a struct here but previously declared as a class
[-Wmismatched-tags]
struct TokenMap : public Container<MapData_t>, public Iterable {
^
././containers.h:50:1: note: did you mean struct here?
class TokenMap;
^~~~~
struct
././shunting-yard.h:147:1: note: did you mean struct here?
class TokenMap;
^~~~~
struct
In file included from test-shunting-yard.cpp:6:
In file included from ././shunting-yard.h:155:
././containers.h:135:1: warning: 'TokenList' defined as a struct here but previously declared as a
class [-Wmismatched-tags]
struct TokenList : public Container<TokenList_t>, public Iterable {
^
././shunting-yard.h:148:1: note: did you mean struct here?
class TokenList;
^~~~~
struct
././shunting-yard.h:242:37: warning: 'const' qualifier on function type 'rWordParser_t' (aka 'void
(const char *, const char **, rpnBuilder *)') has no effect [-Wignored-qualifiers]
void add(const std::string& word, const rWordParser_t* parser) {
^~~~~~
././shunting-yard.h:247:20: warning: 'const' qualifier on function type 'rWordParser_t' (aka 'void
(const char *, const char **, rpnBuilder *)') has no effect [-Wignored-qualifiers]
void add(char c, const rWordParser_t* parser) {
^~~~~~
././shunting-yard.h:347:1: warning: 'opMap_t' defined as a struct here but previously declared as a
class [-Wmismatched-tags]
struct opMap_t : public std::map<std::string, opList_t> {
^
././shunting-yard.h:214:1: note: did you mean struct here?
class opMap_t;
^~~~~
struct
test-shunting-yard.cpp:925:26: error: conversion from 'long' to 'const packToken' is ambiguous
REQUIRE(c1.eval() == ~10l);
^~~~
./catch.hpp:10436:46: note: expanded from macro 'REQUIRE'
#define REQUIRE( expr ) INTERNAL_CATCH_TEST( expr, Catch::ResultDisposition::Normal, "REQUIRE" )
^~~~
./catch.hpp:2076:41: note: expanded from macro 'INTERNAL_CATCH_TEST'
} while( Catch::isTrue( false && !!(expr) ) ) // expr here is never evaluated at runtime bu...
^~~~
././packToken.h:25:3: note: candidate constructor
packToken(int i) : base(new Token<int64_t>(i, INT)) {}
^
././packToken.h:26:3: note: candidate constructor
packToken(int64_t l) : base(new Token<int64_t>(l, INT)) {}
^
././packToken.h:27:3: note: candidate constructor
packToken(bool b) : base(new Token<uint8_t>(b, BOOL)) {}
^
././packToken.h:28:3: note: candidate constructor
packToken(size_t s) : base(new Token<int64_t>(s, INT)) {}
^
././packToken.h:29:3: note: candidate constructor
packToken(float f) : base(new Token<double>(f, REAL)) {}
^
././packToken.h:30:3: note: candidate constructor
packToken(double d) : base(new Token<double>(d, REAL)) {}
^
test-shunting-yard.cpp:928:28: error: conversion from 'long' to 'const packToken' is ambiguous
REQUIRE(c1.eval() == 2 * ~10l);
~~^~~~~~
./catch.hpp:10436:46: note: expanded from macro 'REQUIRE'
#define REQUIRE( expr ) INTERNAL_CATCH_TEST( expr, Catch::ResultDisposition::Normal, "REQUIRE" )
^~~~
./catch.hpp:2076:41: note: expanded from macro 'INTERNAL_CATCH_TEST'
} while( Catch::isTrue( false && !!(expr) ) ) // expr here is never evaluated at runtime bu...
^~~~
././packToken.h:25:3: note: candidate constructor
packToken(int i) : base(new Token<int64_t>(i, INT)) {}
^
././packToken.h:26:3: note: candidate constructor
packToken(int64_t l) : base(new Token<int64_t>(l, INT)) {}
^
././packToken.h:27:3: note: candidate constructor
packToken(bool b) : base(new Token<uint8_t>(b, BOOL)) {}
^
././packToken.h:28:3: note: candidate constructor
packToken(size_t s) : base(new Token<int64_t>(s, INT)) {}
^
././packToken.h:29:3: note: candidate constructor
packToken(float f) : base(new Token<double>(f, REAL)) {}
^
././packToken.h:30:3: note: candidate constructor
packToken(double d) : base(new Token<double>(d, REAL)) {}
^
test-shunting-yard.cpp:931:28: error: conversion from 'long' to 'const packToken' is ambiguous
REQUIRE(c1.eval() == 2 * ~(10l*3));
~~^~~~~~~~~~
./catch.hpp:10436:46: note: expanded from macro 'REQUIRE'
#define REQUIRE( expr ) INTERNAL_CATCH_TEST( expr, Catch::ResultDisposition::Normal, "REQUIRE" )
^~~~
./catch.hpp:2076:41: note: expanded from macro 'INTERNAL_CATCH_TEST'
} while( Catch::isTrue( false && !!(expr) ) ) // expr here is never evaluated at runtime bu...
^~~~
././packToken.h:25:3: note: candidate constructor
packToken(int i) : base(new Token<int64_t>(i, INT)) {}
^
././packToken.h:26:3: note: candidate constructor
packToken(int64_t l) : base(new Token<int64_t>(l, INT)) {}
^
././packToken.h:27:3: note: candidate constructor
packToken(bool b) : base(new Token<uint8_t>(b, BOOL)) {}
^
././packToken.h:28:3: note: candidate constructor
packToken(size_t s) : base(new Token<int64_t>(s, INT)) {}
^
././packToken.h:29:3: note: candidate constructor
packToken(float f) : base(new Token<double>(f, REAL)) {}
^
././packToken.h:30:3: note: candidate constructor
packToken(double d) : base(new Token<double>(d, REAL)) {}
^
test-shunting-yard.cpp:964:26: error: conversion from 'long' to 'const packToken' is ambiguous
REQUIRE(c1.eval() == ~10l);
^~~~
./catch.hpp:10436:46: note: expanded from macro 'REQUIRE'
#define REQUIRE( expr ) INTERNAL_CATCH_TEST( expr, Catch::ResultDisposition::Normal, "REQUIRE" )
^~~~
./catch.hpp:2076:41: note: expanded from macro 'INTERNAL_CATCH_TEST'
} while( Catch::isTrue( false && !!(expr) ) ) // expr here is never evaluated at runtime bu...
^~~~
././packToken.h:25:3: note: candidate constructor
packToken(int i) : base(new Token<int64_t>(i, INT)) {}
^
././packToken.h:26:3: note: candidate constructor
packToken(int64_t l) : base(new Token<int64_t>(l, INT)) {}
^
././packToken.h:27:3: note: candidate constructor
packToken(bool b) : base(new Token<uint8_t>(b, BOOL)) {}
^
././packToken.h:28:3: note: candidate constructor
packToken(size_t s) : base(new Token<int64_t>(s, INT)) {}
^
././packToken.h:29:3: note: candidate constructor
packToken(float f) : base(new Token<double>(f, REAL)) {}
^
././packToken.h:30:3: note: candidate constructor
packToken(double d) : base(new Token<double>(d, REAL)) {}
^
test-shunting-yard.cpp:967:26: error: conversion from 'long' to 'const packToken' is ambiguous
REQUIRE(c1.eval() == ~(2*10l));
^~~~~~~~
./catch.hpp:10436:46: note: expanded from macro 'REQUIRE'
#define REQUIRE( expr ) INTERNAL_CATCH_TEST( expr, Catch::ResultDisposition::Normal, "REQUIRE" )
^~~~
./catch.hpp:2076:41: note: expanded from macro 'INTERNAL_CATCH_TEST'
} while( Catch::isTrue( false && !!(expr) ) ) // expr here is never evaluated at runtime bu...
^~~~
././packToken.h:25:3: note: candidate constructor
packToken(int i) : base(new Token<int64_t>(i, INT)) {}
^
././packToken.h:26:3: note: candidate constructor
packToken(int64_t l) : base(new Token<int64_t>(l, INT)) {}
^
././packToken.h:27:3: note: candidate constructor
packToken(bool b) : base(new Token<uint8_t>(b, BOOL)) {}
^
././packToken.h:28:3: note: candidate constructor
packToken(size_t s) : base(new Token<int64_t>(s, INT)) {}
^
././packToken.h:29:3: note: candidate constructor
packToken(float f) : base(new Token<double>(f, REAL)) {}
^
././packToken.h:30:3: note: candidate constructor
packToken(double d) : base(new Token<double>(d, REAL)) {}
^
test-shunting-yard.cpp:970:35: error: conversion from 'long' to 'const packToken' is ambiguous
REQUIRE(c1.eval() == ~(2*10l) * 3);
~~~~~~~~~^~~
./catch.hpp:10436:46: note: expanded from macro 'REQUIRE'
#define REQUIRE( expr ) INTERNAL_CATCH_TEST( expr, Catch::ResultDisposition::Normal, "REQUIRE" )
^~~~
./catch.hpp:2076:41: note: expanded from macro 'INTERNAL_CATCH_TEST'
} while( Catch::isTrue( false && !!(expr) ) ) // expr here is never evaluated at runtime bu...
^~~~
././packToken.h:25:3: note: candidate constructor
packToken(int i) : base(new Token<int64_t>(i, INT)) {}
^
././packToken.h:26:3: note: candidate constructor
packToken(int64_t l) : base(new Token<int64_t>(l, INT)) {}
^
././packToken.h:27:3: note: candidate constructor
packToken(bool b) : base(new Token<uint8_t>(b, BOOL)) {}
^
././packToken.h:28:3: note: candidate constructor
packToken(size_t s) : base(new Token<int64_t>(s, INT)) {}
^
././packToken.h:29:3: note: candidate constructor
packToken(float f) : base(new Token<double>(f, REAL)) {}
^
././packToken.h:30:3: note: candidate constructor
packToken(double d) : base(new Token<double>(d, REAL)) {}
^
test-shunting-yard.cpp:974:26: error: conversion from 'long' to 'const packToken' is ambiguous
REQUIRE(c1.eval() == ~10l);
^~~~
./catch.hpp:10436:46: note: expanded from macro 'REQUIRE'
#define REQUIRE( expr ) INTERNAL_CATCH_TEST( expr, Catch::ResultDisposition::Normal, "REQUIRE" )
^~~~
./catch.hpp:2076:41: note: expanded from macro 'INTERNAL_CATCH_TEST'
} while( Catch::isTrue( false && !!(expr) ) ) // expr here is never evaluated at runtime bu...
^~~~
././packToken.h:25:3: note: candidate constructor
packToken(int i) : base(new Token<int64_t>(i, INT)) {}
^
././packToken.h:26:3: note: candidate constructor
packToken(int64_t l) : base(new Token<int64_t>(l, INT)) {}
^
././packToken.h:27:3: note: candidate constructor
packToken(bool b) : base(new Token<uint8_t>(b, BOOL)) {}
^
././packToken.h:28:3: note: candidate constructor
packToken(size_t s) : base(new Token<int64_t>(s, INT)) {}
^
././packToken.h:29:3: note: candidate constructor
packToken(float f) : base(new Token<double>(f, REAL)) {}
^
././packToken.h:30:3: note: candidate constructor
packToken(double d) : base(new Token<double>(d, REAL)) {}
^
test-shunting-yard.cpp:977:28: error: conversion from 'long' to 'const packToken' is ambiguous
REQUIRE(c1.eval() == 2 * ~10l);
~~^~~~~~
./catch.hpp:10436:46: note: expanded from macro 'REQUIRE'
#define REQUIRE( expr ) INTERNAL_CATCH_TEST( expr, Catch::ResultDisposition::Normal, "REQUIRE" )
^~~~
./catch.hpp:2076:41: note: expanded from macro 'INTERNAL_CATCH_TEST'
} while( Catch::isTrue( false && !!(expr) ) ) // expr here is never evaluated at runtime bu...
^~~~
././packToken.h:25:3: note: candidate constructor
packToken(int i) : base(new Token<int64_t>(i, INT)) {}
^
././packToken.h:26:3: note: candidate constructor
packToken(int64_t l) : base(new Token<int64_t>(l, INT)) {}
^
././packToken.h:27:3: note: candidate constructor
packToken(bool b) : base(new Token<uint8_t>(b, BOOL)) {}
^
././packToken.h:28:3: note: candidate constructor
packToken(size_t s) : base(new Token<int64_t>(s, INT)) {}
^
././packToken.h:29:3: note: candidate constructor
packToken(float f) : base(new Token<double>(f, REAL)) {}
^
././packToken.h:30:3: note: candidate constructor
packToken(double d) : base(new Token<double>(d, REAL)) {}
^
test-shunting-yard.cpp:980:35: error: conversion from 'long' to 'const packToken' is ambiguous
REQUIRE(c1.eval() == 2 * ~10l * 3);
~~~~~~~~~^~~
./catch.hpp:10436:46: note: expanded from macro 'REQUIRE'
#define REQUIRE( expr ) INTERNAL_CATCH_TEST( expr, Catch::ResultDisposition::Normal, "REQUIRE" )
^~~~
./catch.hpp:2076:41: note: expanded from macro 'INTERNAL_CATCH_TEST'
} while( Catch::isTrue( false && !!(expr) ) ) // expr here is never evaluated at runtime bu...
^~~~
././packToken.h:25:3: note: candidate constructor
packToken(int i) : base(new Token<int64_t>(i, INT)) {}
^
././packToken.h:26:3: note: candidate constructor
packToken(int64_t l) : base(new Token<int64_t>(l, INT)) {}
^
././packToken.h:27:3: note: candidate constructor
packToken(bool b) : base(new Token<uint8_t>(b, BOOL)) {}
^
././packToken.h:28:3: note: candidate constructor
packToken(size_t s) : base(new Token<int64_t>(s, INT)) {}
^
././packToken.h:29:3: note: candidate constructor
packToken(float f) : base(new Token<double>(f, REAL)) {}
^
././packToken.h:30:3: note: candidate constructor
packToken(double d) : base(new Token<double>(d, REAL)) {}
^
test-shunting-yard.cpp:984:35: error: conversion from 'long' to 'const packToken' is ambiguous
REQUIRE(c1.eval() == 2 * ~10l * 3);
~~~~~~~~~^~~
./catch.hpp:10436:46: note: expanded from macro 'REQUIRE'
#define REQUIRE( expr ) INTERNAL_CATCH_TEST( expr, Catch::ResultDisposition::Normal, "REQUIRE" )
^~~~
./catch.hpp:2076:41: note: expanded from macro 'INTERNAL_CATCH_TEST'
} while( Catch::isTrue( false && !!(expr) ) ) // expr here is never evaluated at runtime bu...
^~~~
././packToken.h:25:3: note: candidate constructor
packToken(int i) : base(new Token<int64_t>(i, INT)) {}
^
././packToken.h:26:3: note: candidate constructor
packToken(int64_t l) : base(new Token<int64_t>(l, INT)) {}
^
././packToken.h:27:3: note: candidate constructor
packToken(bool b) : base(new Token<uint8_t>(b, BOOL)) {}
^
././packToken.h:28:3: note: candidate constructor
packToken(size_t s) : base(new Token<int64_t>(s, INT)) {}
^
././packToken.h:29:3: note: candidate constructor
packToken(float f) : base(new Token<double>(f, REAL)) {}
^
././packToken.h:30:3: note: candidate constructor
packToken(double d) : base(new Token<double>(d, REAL)) {}
^
test-shunting-yard.cpp:987:35: error: conversion from 'long' to 'const packToken' is ambiguous
REQUIRE(c1.eval() == ~(2*10l) * 3);
~~~~~~~~~^~~
./catch.hpp:10436:46: note: expanded from macro 'REQUIRE'
#define REQUIRE( expr ) INTERNAL_CATCH_TEST( expr, Catch::ResultDisposition::Normal, "REQUIRE" )
^~~~
./catch.hpp:2076:41: note: expanded from macro 'INTERNAL_CATCH_TEST'
} while( Catch::isTrue( false && !!(expr) ) ) // expr here is never evaluated at runtime bu...
^~~~
././packToken.h:25:3: note: candidate constructor
packToken(int i) : base(new Token<int64_t>(i, INT)) {}
^
././packToken.h:26:3: note: candidate constructor
packToken(int64_t l) : base(new Token<int64_t>(l, INT)) {}
^
././packToken.h:27:3: note: candidate constructor
packToken(bool b) : base(new Token<uint8_t>(b, BOOL)) {}
^
././packToken.h:28:3: note: candidate constructor
packToken(size_t s) : base(new Token<int64_t>(s, INT)) {}
^
././packToken.h:29:3: note: candidate constructor
packToken(float f) : base(new Token<double>(f, REAL)) {}
^
././packToken.h:30:3: note: candidate constructor
packToken(double d) : base(new Token<double>(d, REAL)) {}
^
test-shunting-yard.cpp:990:35: error: conversion from 'long' to 'const packToken' is ambiguous
REQUIRE(c1.eval() == ~(2*10l) * 3);
~~~~~~~~~^~~
./catch.hpp:10436:46: note: expanded from macro 'REQUIRE'
#define REQUIRE( expr ) INTERNAL_CATCH_TEST( expr, Catch::ResultDisposition::Normal, "REQUIRE" )
^~~~
./catch.hpp:2076:41: note: expanded from macro 'INTERNAL_CATCH_TEST'
} while( Catch::isTrue( false && !!(expr) ) ) // expr here is never evaluated at runtime bu...
^~~~
././packToken.h:25:3: note: candidate constructor
packToken(int i) : base(new Token<int64_t>(i, INT)) {}
^
././packToken.h:26:3: note: candidate constructor
packToken(int64_t l) : base(new Token<int64_t>(l, INT)) {}
^
././packToken.h:27:3: note: candidate constructor
packToken(bool b) : base(new Token<uint8_t>(b, BOOL)) {}
^
././packToken.h:28:3: note: candidate constructor
packToken(size_t s) : base(new Token<int64_t>(s, INT)) {}
^
././packToken.h:29:3: note: candidate constructor
packToken(float f) : base(new Token<double>(f, REAL)) {}
^
././packToken.h:30:3: note: candidate constructor
packToken(double d) : base(new Token<double>(d, REAL)) {}
^
In file included from test-shunting-yard.cpp:4:
./catch.hpp:1336:44: error: conversion from 'long' to 'const packToken' is ambiguous
return bool( opCast( lhs ) == opCast( rhs ) );
^~~~~~~~~~~~~
./catch.hpp:1381:39: note: in instantiation of member function 'Catch::Internal::Evaluator<packToken,
long, Catch::Internal::Operator::IsEqualTo>::evaluate' requested here
return Evaluator<T1, T2, Op>::evaluate( lhs, rhs );
^
./catch.hpp:1874:39: note: in instantiation of function template specialization
'Catch::Internal::compare<Catch::Internal::Operator::IsEqualTo, packToken, long>' requested here
.setResultType( Internal::compare<Op>( m_lhs, rhs ) )
^
./catch.hpp:1817:16: note: in instantiation of function template specialization
'Catch::ExpressionLhs<const packToken &>::captureExpression<Catch::Internal::Operator::IsEqualTo,
long>' requested here
return captureExpression<Internal::IsEqualTo>( rhs );
^
test-shunting-yard.cpp:925:23: note: in instantiation of function template specialization
'Catch::ExpressionLhs<const packToken &>::operator==<long>' requested here
REQUIRE(c1.eval() == ~10l);
^
././packToken.h:25:3: note: candidate constructor
packToken(int i) : base(new Token<int64_t>(i, INT)) {}
^
././packToken.h:26:3: note: candidate constructor
packToken(int64_t l) : base(new Token<int64_t>(l, INT)) {}
^
././packToken.h:27:3: note: candidate constructor
packToken(bool b) : base(new Token<uint8_t>(b, BOOL)) {}
^
././packToken.h:28:3: note: candidate constructor
packToken(size_t s) : base(new Token<int64_t>(s, INT)) {}
^
././packToken.h:29:3: note: candidate constructor
packToken(float f) : base(new Token<double>(f, REAL)) {}
^
././packToken.h:30:3: note: candidate constructor
packToken(double d) : base(new Token<double>(d, REAL)) {}
^
6 warnings and 13 errors generated.
make: *** [test-shunting-yard.o] Error 1
$ clang -v
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin15.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin