Problem with regex
Tiago Maluta
tiago.maluta@gmail.com
Mon Aug 16 19:45:00 GMT 2010
On Mon, Aug 16, 2010 at 6:13 PM, Alexander Seifert
<alexander.seifert@freenet.de> wrote:
> Hello,
>
> my library is: version 4.4.1
>
> Informationen für Paket libstdc++44:
>
> Repository: @System
> Name: libstdc++44
> Version: 4.4.1_20090817-2.3.4
> Arch: x86_64
> Hersteller: openSUSE
> Installiert: Ja
> Status: aktuell
> Installierte Größe: 996,0 KiB
> Zusammenfassung: Dynamische C++-Bibliotheken
> Beschreibung:
> Die Standard C++ Bibliothek. Wird für dynamisch gelinkte C++-Programme
> benötigt.
>
> I will use regex
>
> A little of my code
>
> /////////
> #include <regex>
> /*...
> class Xx code and further
> */
>
> void Xx::useRegex()
> {
> regex re("RegularExpression"); //Thats get an error
> }
> /////////
>
> Is regex not full implement in libstdc++44?
> Or need I a further library? Or need I a flag, like g++ -flag!
> g++ -std=c++0x regexXx.cpp. Will produce an error!
>
> Thank you
> Alexander Seifert
>
>
>
>
Just change the #include definition and namespace usage. The g++
parameters stay the same.
$ g++ -std=c++0x regexXx.cp
--- x ---
#include <tr1/regex>
using namespace std;
class Xx {
public:
void useRegex();
};
void Xx::useRegex() {
tr1::regex rx("");
}
--- x ---
--tm
More information about the Gcc-help
mailing list