Boost logo

Boost :

From: Lorenzo Bettini (bettini_at_[hidden])
Date: 2005-08-16 05:26:27


Hi

in 1.31 bad_expression was

class bad_expression : public bad_pattern
{
public:
    bad_expression(const std::string& s) : bad_pattern(s) {}
};

now in 1.33 it is

class regex_error : public std::runtime_error
{
public:
    explicit regex_error(const std::string& s,
regex_constants::error_type err, std::ptrdiff_t pos);
    explicit regex_error(boost::regex_constants::error_type err);
    boost::regex_constants::error_type code()const;
    std::ptrdiff_t position()const;
};

typedef regex_error bad_pattern; // for backwards compatibility
typedef regex_error bad_expression; // for backwards compatibility

so I was wondering if there's a way to make

throw boost::bad_expression("internal error");

compile on both versions of the library (this statement was reported not
to compile with 1.33 by a user of one of my programs)

many thanks in advance
        Lorenzo

-- 
+-----------------------------------------------------+
|  Lorenzo Bettini          ICQ# lbetto, 16080134     |
|  PhD in Computer Science                            |
|  Dip. Sistemi e Informatica, Univ. di Firenze       |
|  Florence - Italy        (GNU/Linux User # 158233)  |
|  Home Page        : http://www.lorenzobettini.it    |
|  http://music.dsi.unifi.it         XKlaim language  |
|  http://www.lorenzobettini.it/purple    Cover Band  |
|  http://www.gnu.org/software/src-highlite           |
|  http://www.gnu.org/software/gengetopt              |
|  http://www.lorenzobettini.it/software/gengen       |
|  http://www.lorenzobettini.it/software/doublecpp    |
+-----------------------------------------------------+

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk