I’m evaluating Visual Paradigm for UML SE 10.1 and trying to reverse my C++ code. The first attempt resulted in parse error.
The code (Exception.hpp):
//=============================================================================================================================
// * Name : Exception.hpp
// * Author : Alexandr Kuznetsov
// * Created on: 25.12.2012
// * Copyright : Copyright xensoftlab. Содержимое этого файла является собственностью компании xensoftlab и не подлежит
// * распространению.
//=============================================================================================================================
#pragma once
#define __XEN_LANG_EXCEPTION_INCLUDED
//-----------------------------------------------------------------------------------------------------------------------------
#include <string>
#include <vector>
#include <memory>
#include <iostream>
#include "type_defs.hpp"
#include "ReservedAllocator.hpp"
//-----------------------------------------------------------------------------------------------------------------------------
namespace xen
{
namespace lang
{
template <typename T, int Allign = 0>
class Allocator;
template <typename charT, typename Alloc = Allocator<charT> >
class xen_string;
typedef xen_string<char> string;
typedef xen_string<wchar_t> wstring;
/**
* Тип строки используемый исключениями, а так-же другими критичными для выполнения программы алгоритмами.
* Этот тип использует резервную кучу динамической памяти.
*/
typedef std::basic_string<char, std::char_traits<char>, ReservedAllocator<char> > rstring;
...
The error message:
[12:41:25] [Error] Unable to read file/home/progmachine/program/workspaces/xensoftlab.workspace/xen.core/src/xen.lang/Exception.hpp, Parse error at line 29, column 61. Encountered: >
Parser can’t understand last closing “>” or something before it in forward declaration in line
template <typename charT, typename Alloc = Allocator<charT> >
What I’m doing wrong? Or this is a bug?