Код: Выделить всё
error: expected nested-name-specifier before ‘TaskCPtr’
Код:
Код: Выделить всё
// src/GData/foo.h
namespace GData
{
struct TaskData
{};
using TaskCPtr = std::shared_ptr;
}
Код: Выделить всё
// src/GObject/foo_bar.h
namespace Task
{
template
struct TaskStatus
{};
}
Код: Выделить всё
// src/GObject/bar.h
#include "GData/foo.h"
#include "foo_bar.h"
namespace GObject
{
using SPTaskStatus = Task::TaskStatus;
}
Код: Выделить всё
// src/main.cpp
#include "GObject/bar.h"
int main(int argc, char** argv) {
std::cout
Подробнее здесь: [url]https://stackoverflow.com/questions/79798697/template-instanciation-fails[/url]
Мобильная версия