In file included from main.cpp:2:0:
SmartPointer.hpp:8:42: error: expected class-name before '{' token
class FormatVisitor : public BaseVisitor {
^
SmartPointer.hpp:10:22: error: 'BaseNode' does not name a type
void Visit(const BaseNode* node) override {
^~~~~~~~
SmartPointer.hpp:14:22: error: 'ClassDeclarationNode' does not name a type
void Visit(const ClassDeclarationNode* node) override {
^~~~~~~~~~~~~~~~~~~~
SmartPointer.hpp:14:10: error: 'void FormatVisitor::Visit(const int*)' cannot be overloaded
void Visit(const ClassDeclarationNode* node) override {
^~~~~
SmartPointer.hpp:10:10: error: with 'void FormatVisitor::Visit(const int*)'
void Visit(const BaseNode* node) override {
^~~~~
SmartPointer.hpp:43:22: error: 'VarDeclarationNode' does not name a type
void Visit(const VarDeclarationNode* node) override {
^~~~~~~~~~~~~~~~~~
SmartPointer.hpp:43:10: error: 'void FormatVisitor::Visit(const int*)' cannot be overloaded
void Visit(const VarDeclarationNode* node) override {
^~~~~
SmartPointer.hpp:10:10: error: with 'void FormatVisitor::Visit(const int*)'
void Visit(const BaseNode* node) override {
^~~~~
SmartPointer.hpp:54:22: error: 'MethodDeclarationNode' does not name a type
void Visit(const MethodDeclarationNode* node) override {
^~~~~~~~~~~~~~~~~~~~~
SmartPointer.hpp:54:10: error: 'void FormatVisitor::Visit(const int*)' cannot be overloaded
void Visit(const MethodDeclarationNode* node) override {
^~~~~
SmartPointer.hpp:10:10: error: with 'void FormatVisitor::Visit(const int*)'
void Visit(const BaseNode* node) override {
^~~~~
SmartPointer.hpp:63:11: error: 'std::__cxx11::string {aka std::__cxx11::basic_string<char>}' is not a template
const string<string>& GetFormattedCode() const {
^~~~~~
SmartPointer.hpp:68:5: error: 'std::__cxx11::string {aka std::__cxx11::basic_string<char>}' is not a template
string<string> v;
^~~~~~
SmartPointer.hpp:80:19: error: 'std::__cxx11::string {aka std::__cxx11::basic_string<char>}' is not a template
void visiting(string<BaseNode*> z) {
^~~~~~
SmartPointer.hpp:80:26: error: 'BaseNode' was not declared in this scope
void visiting(string<BaseNode*> z) {
^~~~~~~~
SmartPointer.hpp:80:35: error: expected primary-expression before '>' token
void visiting(string<BaseNode*> z) {
^
SmartPointer.hpp:10:10: error: 'void FormatVisitor::Visit(const int*)' marked 'override', but does not override
void Visit(const BaseNode* node) override {
^~~~~
SmartPointer.hpp: In member function 'void FormatVisitor::Visit(const int*)':
SmartPointer.hpp:11:15: error: request for member 'Visit' in '* node', which is of non-class type 'const int'
node->Visit(this);
^~~~~
SmartPointer.hpp: In member function 'void FormatVisitor::Visit(const int*)':
SmartPointer.hpp:15:34: error: request for member 'PublicFields' in '* node', which is of non-class type 'const int'
int64_t pub_size = node->PublicFields().size();
^~~~~~~~~~~~
SmartPointer.hpp:16:35: error: request for member 'ProtectedFields' in '* node', which is of non-class type 'const int'
int64_t prot_size = node->ProtectedFields().size();
^~~~~~~~~~~~~~~
SmartPointer.hpp:17:35: error: request for member 'PrivateFields' in '* node', which is of non-class type 'const int'
int64_t priv_size = node->PrivateFields().size();
^~~~~~~~~~~~~
SmartPointer.hpp:19:47: error: request for member 'ClassName' in '* node', which is of non-class type 'const int'
v.push_back(tubs() + "class " + node->ClassName() + " {");
^~~~~~~~~
SmartPointer.hpp:22:45: error: no matching function for call to 'std::__cxx11::basic_string<char>::push_back(std::__cxx11::basic_string<char>)'
v.push_back(tubs() + " public:");
^
In file included from /usr/include/c++/7/string:52:0,
from SmartPointer.hpp:3,
from main.cpp:2:
/usr/include/c++/7/bits/basic_string.h:1339:7: note: candidate: void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::push_back(_CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]
push_back(_CharT __c)
^~~~~~~~~
/usr/include/c++/7/bits/basic_string.h:1339:7: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>' to 'char'
In file included from main.cpp:2:0:
SmartPointer.hpp:23:28: error: request for member 'PublicFields' in '* node', which is of non-class type 'const int'
visiting(node->PublicFields());
^~~~~~~~~~~~
SmartPointer.hpp:25:31: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
v.push_back("");
^
In file included from /usr/include/c++/7/string:52:0,
from SmartPointer.hpp:3,
from main.cpp:2:
/usr/include/c++/7/bits/basic_string.h:1339:7: note: initializing argument 1 of 'void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::push_back(_CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
push_back(_CharT __c)
^~~~~~~~~
In file included from main.cpp:2:0:
SmartPointer.hpp:29:48: error: no matching function for call to 'std::__cxx11::basic_string<char>::push_back(std::__cxx11::basic_string<char>)'
v.push_back(tubs() + " protected:");
^
In file included from /usr/include/c++/7/string:52:0,
from SmartPointer.hpp:3,
from main.cpp:2:
/usr/include/c++/7/bits/basic_string.h:1339:7: note: candidate: void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::push_back(_CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]
push_back(_CharT __c)
^~~~~~~~~
/usr/include/c++/7/bits/basic_string.h:1339:7: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>' to 'char'
In file included from main.cpp:2:0:
SmartPointer.hpp:30:28: error: request for member 'ProtectedFields' in '* node', which is of non-class type 'const int'
visiting(node->ProtectedFields());
^~~~~~~~~~~~~~~
SmartPointer.hpp:32:31: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
v.push_back("");
^
In file included from /usr/include/c++/7/string:52:0,
from SmartPointer.hpp:3,
from main.cpp:2:
/usr/include/c++/7/bits/basic_string.h:1339:7: note: initializing argument 1 of 'void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::push_back(_CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
push_back(_CharT __c)
^~~~~~~~~
In file included from main.cpp:2:0:
SmartPointer.hpp:36:46: error: no matching function for call to 'std::__cxx11::basic_string<char>::push_back(std::__cxx11::basic_string<char>)'
v.push_back(tubs() + " private:");
^
In file included from /usr/include/c++/7/string:52:0,
from SmartPointer.hpp:3,
from main.cpp:2:
/usr/include/c++/7/bits/basic_string.h:1339:7: note: candidate: void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::push_back(_CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]
push_back(_CharT __c)
^~~~~~~~~
/usr/include/c++/7/bits/basic_string.h:1339:7: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>' to 'char'
In file included from main.cpp:2:0:
SmartPointer.hpp:37:28: error: request for member 'PrivateFields' in '* node', which is of non-class type 'const int'
visiting(node->PrivateFields());
^~~~~~~~~~~~~
SmartPointer.hpp:40:34: error: no matching function for call to 'std::__cxx11::basic_string<char>::push_back(std::__cxx11::basic_string<char>)'
v.push_back(tubs() + "};");
^
In file included from /usr/include/c++/7/string:52:0,
from SmartPointer.hpp:3,
from main.cpp:2:
/usr/include/c++/7/bits/basic_string.h:1339:7: note: candidate: void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::push_back(_CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]
push_back(_CharT __c)
^~~~~~~~~
/usr/include/c++/7/bits/basic_string.h:1339:7: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>' to 'char'
In file included from main.cpp:2:0:
SmartPointer.hpp: In member function 'void FormatVisitor::Visit(const int*)':
SmartPointer.hpp:44:28: error: request for member 'TypeName' in '* node', which is of non-class type 'const int'
string arg = node->TypeName() + " " + node->VarName();
^~~~~~~~
SmartPointer.hpp:44:53: error: request for member 'VarName' in '* node', which is of non-class type 'const int'
string arg = node->TypeName() + " " + node->VarName();
^~~~~~~
SmartPointer.hpp:46:22: error: no match for 'operator+=' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<char> >::value_type {aka char}' and 'std::__cxx11::string {aka std::__cxx11::basic_string<char>}')
v.back() += arg;
~~~~~~~~~^~~~~~
SmartPointer.hpp:48:26: error: invalid conversion from 'char*' to '__gnu_cxx::__alloc_traits<std::allocator<char> >::value_type {aka char}' [-fpermissive]
v.back() += ", ";
~~~~~~~~~^~~~~~~
SmartPointer.hpp:50:43: error: no matching function for call to 'std::__cxx11::basic_string<char>::push_back(std::__cxx11::basic_string<char>)'
v.push_back(tubs() + arg + ";");
^
In file included from /usr/include/c++/7/string:52:0,
from SmartPointer.hpp:3,
from main.cpp:2:
/usr/include/c++/7/bits/basic_string.h:1339:7: note: candidate: void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::push_back(_CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]
push_back(_CharT __c)
^~~~~~~~~
/usr/include/c++/7/bits/basic_string.h:1339:7: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>' to 'char'
In file included from main.cpp:2:0:
SmartPointer.hpp: In member function 'void FormatVisitor::Visit(const int*)':
SmartPointer.hpp:55:36: error: request for member 'ReturnTypeName' in '* node', which is of non-class type 'const int'
v.push_back(tubs() + node->ReturnTypeName() + " "
^~~~~~~~~~~~~~
SmartPointer.hpp:56:21: error: request for member 'MethodName' in '* node', which is of non-class type 'const int'
+ node->MethodName() + "(");
^~~~~~~~~~
SmartPointer.hpp:58:24: error: request for member 'Arguments' in '* node', which is of non-class type 'const int'
visiting(node->Arguments());
^~~~~~~~~
SmartPointer.hpp:59:18: error: invalid conversion from 'char*' to '__gnu_cxx::__alloc_traits<std::allocator<char> >::value_type {aka char}' [-fpermissive]
v.back() += ");";
~~~~~~~~~^~~~~~~
SmartPointer.hpp: In member function 'void FormatVisitor::visiting(std::__cxx11::string)':
SmartPointer.hpp:85:17: error: base operand of '->' is not a pointer
z[i]->Visit(this);
^~
In file included from main.cpp:3:0:
Test_SmartPointer.hpp: At global scope:
Test_SmartPointer.hpp:10:17: error: 'smart_pointer' is not a namespace-name
using namespace smart_pointer;
^~~~~~~~~~~~~
Test_SmartPointer.hpp:10:30: error: expected namespace-name before ';' token
using namespace smart_pointer;
^
Test_SmartPointer.hpp:11:30: error: 'SmartPointer' does not name a type
using SmartPointer__type_t = SmartPointer<float, std::allocator<float>>;
^~~~~~~~~~~~
Test_SmartPointer.hpp:12:38: error: 'SmartPointer' does not name a type
using SmartPointer__another_type_t = SmartPointer<uint64_t, std::allocator<uint64_t>>;
^~~~~~~~~~~~
Test_SmartPointer.hpp: In function 'std::enable_if_t<std::is_floating_point<_Tp>::value> __stress_tests__SmartPointer_operator_star(const string&)':
Test_SmartPointer.hpp:17:5: error: there are no arguments to 'TEST_BLOCK' that depend on a template parameter, so a declaration of 'TEST_BLOCK' must be available [-fpermissive]
TEST_BLOCK("[stress] SmartPointer[non-nullptr]::operator*() const") {
^~~~~~~~~~
Test_SmartPointer.hpp:17:5: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
Test_SmartPointer.hpp:17:73: error: expected ';' before '{' token
TEST_BLOCK("[stress] SmartPointer[non-nullptr]::operator*() const") {
^
Test_SmartPointer.hpp:33:5: error: there are no arguments to 'TEST_BLOCK' that depend on a template parameter, so a declaration of 'TEST_BLOCK' must be available [-fpermissive]
TEST_BLOCK("[stress] SmartPointer[non-nullptr]::operator*()") {
^~~~~~~~~~
Test_SmartPointer.hpp:33:67: error: expected ';' before '{' token
TEST_BLOCK("[stress] SmartPointer[non-nullptr]::operator*()") {
^
Test_SmartPointer.hpp: In function 'std::enable_if_t<std::is_integral<_Tp>::value> __stress_tests__SmartPointer_operator_star(const string&)':
Test_SmartPointer.hpp:55:5: error: there are no arguments to 'TEST_BLOCK' that depend on a template parameter, so a declaration of 'TEST_BLOCK' must be available [-fpermissive]
TEST_BLOCK("[stress] SmartPointer[non-nullptr]::operator*() const") {
^~~~~~~~~~
Test_SmartPointer.hpp:55:73: error: expected ';' before '{' token
TEST_BLOCK("[stress] SmartPointer[non-nullptr]::operator*() const") {
^
In file included from main.cpp:3:0:
Test_SmartPointer.hpp:71:5: error: there are no arguments to 'TEST_BLOCK' that depend on a template parameter, so a declaration of 'TEST_BLOCK' must be available [-fpermissive]
TEST_BLOCK("[stress] SmartPointer[non-nullptr]::operator*()") {
^~~~~~~~~~
Test_SmartPointer.hpp:71:67: error: expected ';' before '{' token
TEST_BLOCK("[stress] SmartPointer[non-nullptr]::operator*()") {
^
Test_SmartPointer.hpp: At global scope:
Test_SmartPointer.hpp:97:19: error: expected constructor, destructor, or type conversion before '(' token
DEFINE_CLASS_TESTS(SmartPointer__type_t) {
^
main.cpp: In function 'int main()':
main.cpp:6:24: error: 'SmartPointer__type_t' was not declared in this scope
EXECUTE_CLASS_TEST(SmartPointer__type_t);
^~~~~~~~~~~~~~~~~~~~
main.cpp:6:5: error: 'EXECUTE_CLASS_TEST' was not declared in this scope
EXECUTE_CLASS_TEST(SmartPointer__type_t);
^~~~~~~~~~~~~~~~~~
main.cpp:7:7: error: 'cout' is not a member of 'std'
std::cout << 1 << std::endl;
^~~~
main.cpp:7:7: note: suggested alternative: 'cbrt'
std::cout << 1 << std::endl;
^~~~
cbrt
main.cpp:7:25: error: 'endl' is not a member of 'std'
std::cout << 1 << std::endl;
^~~~
main.cpp:7:25: note: suggested alternative: 'end'
std::cout << 1 << std::endl;
^~~~
end
|