Re: [Mingw-w64-public] std::regex not fulfilling standard? missing templates

2016-11-02 Thread NightStrike
On Wed, Nov 2, 2016 at 9:07 PM, Jim Michaels  wrote:
> #include 
> #include 
> int main(void) {
> std::cout<<(std::regex_match("abcdefg",std::regex("def",std::regex_constants::extended))?"true":"false")< return 0;}
>
> corrected some more bugs in that example and got "false". not sure why
> this is. sorry for the bumpy ride.

This is, like your previous issue, due to your lack of understanding
the rules of C++ (specifically, the C++ Standard Library).  You should
make use of cppreference.com, as it's a very good information source
here.  If you did, you'd see this:

http://en.cppreference.com/w/cpp/regex/regex_match
"...Determines if there is a match between the regular expression e
and the entire target character sequence [first,last)"

What you really want is this:

http://en.cppreference.com/w/cpp/regex/regex_search
"Determines if there is a match between the regular expression e
and some subsequence in the target character sequence"

Notice the difference?  The function you are using matches on the
entire string, and thus only returns true if the regex is true for the
entire string.  The second function operates on a substring, which is
what you want here.  It's more like "grep" in this regard, if that
analogy works for you.

Please try to read the documentation of the language.

> the function below is an old namespace clash bug between user-defined str
> and compiler's std for string and maybe algorithm.

No, it was your incorrect use of namespace syntax.  The compiler is fine.

> I could suppose it might be 10 years for a fix for that to reach gcc...
> :-( I know you folks are really busy. I just want a working and hopefully
> up-to-date compiler from somewhere for windows that isn't waving the
> dragon flag (you've *got* to be serious folks, those things are nasty).

I think you should update your knowledge of the language.  I also
think you should ask these basic, fundamental language questions in a
forum that is geared toward this sort of thing.  You have been
emailing this list for years now, and aside from one or two exceptions
(you did point out a valid bug or two), every email has been off
topic.  We are generally pretty lenient, and try to be a helpful
audience.  But then, you aren't very nice about it, either.  Honestly,
you're kind of a mean, highly insulting person that demands basic
"google search" help on the wrong topic from the wrong people.  I
don't understand why you do this repeatedly, year after year.

I hope you realize what mingw-w64 is and is not:  It is a project that
provides headers and imports to the Windows APIs.  As a nicety, we
also host some compiler toolchains that kind people build as a
convenience ONLY.  We are *NOT* GCC.  You can find that project at
gcc.gnu.org, whereas we are at mingw-w64.sf.net.  We are also not a
general programming help forum.  We tend to be nice people that help
each other out, and I myself have asked lots of questions over the
years that are unrelated to mingw-w64, both on the list and mainly in
IRC.  But just like you wouldn't try to buy postage stamps at a
restaurant, you are really barking up the wrong tree here.  I think,
honestly, what you really need is a good programming resource or
tutor.  Perhaps lynda.com can be of help here, or
irc://irc.freenode.net/##C++-general

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] std::regex not fulfilling standard? missing templates

2016-11-02 Thread NightStrike
On Wed, Nov 2, 2016 at 8:09 PM, Jim Michaels  wrote:
> namespace str {
> std::string str::localestringlower(std::string s) {
> //not sure if std::locale:: will solve conflicting namespaces
> between  and 
> for (size_t i=0; i < s.size(); i++) {
> s[i]=std::tolower(s[i]);
> }
> return s;
> }
> }
> here's another one, compile that and see if it throws error messages about
> declaring a std::string in an arg. it's in a namespace str.

You aren't using the language correctly here.  When you do something like this:

namespace str {
// .
}

Everything inside there implicitly is part of the str namespace.  So doing this:

namespace str {
int str::i();
}

is not doing what you think it's doing.  That's creating essentially this:

::str::str::i();

So basically, to fix your code snippet, change this:

 std::string str::localestringlower(std::string s) {

to:

 std::string localestringlower(std::string s) {

Or, define it outside of the namespace str { } block and leave the
namespace qualifier in tact.


I suggest you read up on the syntax of the language, and specifically
how names in C++ are qualified.

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [PATCH] lib32 msvcrt add mkgmtime exports - XP support?

2016-11-02 Thread Jim Michaels
I get enough XP boxes coming my way that spare my backside that I wish XP
support would not stop. still trying to get my win7 box up and going again
after hw failure.




On Wed, November 2, 2016 4:27 pm, JonY wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
>
> On 11/2/2016 16:56, Adrien Nader wrote:
>
>> Hi,
>>
>>
>> A small thread hijack.
>>
>>
>> On Mon, Oct 31, 2016, Martell Malone wrote:
>>
>>> Hey guys,
>>>
>>>
>>> My only concern is if this is supported on windows xp.
>>> https://msdn.microsoft.com/en-us/library/2093ets1.aspx MSDN has a
>>> doc version from VS2005. I don't see anything about a min windows
>>> version there. We already have this in the lib64 variant. So all
>>> indicators are good.
>>
>> Some time ago there has been a conversation about XP support and v5
>> and future versions on IRC. And basically it said that XP support could
>> be dropped after v5. So, what's the status?
>>
>
> I'm OK with this, Kai?
>
>
> -BEGIN PGP SIGNATURE-
>
>
> iF4EAREIAAYFAlgadmQACgkQk721PNTrx0DPyAEAnU8i5dkxxWAwVG8dQCC/D6be
> QkD1asdEl0Q936qRMzMA/0/pViuDE88V6L9fIWN41LVwzsUIIau1pdZPAHMS8mSz
> =ppfV
> -END PGP SIGNATURE-
> --
> 
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today.
> http://sdm.link/xeonphi___
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
>


-- 
Jim Michaels
jim.micha...@jesusnjim.com


--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] std::regex not fulfilling standard? missing templates

2016-11-02 Thread Jim Michaels
#include 
#include 
int main(void) {
std::cout<<(std::regex_match("abcdefg",std::regex("def",std::regex_constants::extended))?"true":"false")< namespace str { std::string str::localestringlower(std::string s) {
> //not sure if std::locale:: will solve conflicting namespaces
> between  and  for (size_t i=0; i < s.size(); i++) {
> s[i]=std::tolower(s[i]);
> }
> return s; }
> }
> here's another one, compile that and see if it throws error messages about
>  declaring a std::string in an arg. it's in a namespace str.
>
>
> std::cout< s::extended))?"true":"false")<
>
> I had a bug in my code, however I fixed it ansd still get
> find.cpp: In function 'bool processFile(std::__cxx11::string)':
> find.cpp:258:189: error: no matching function for call to
> 'std::__cxx11::basic_regex::basic_regex(__gnu_cxx::__alloc_traits d::allocator
>>> ::value_type&, unsigned int)'
>>>
>
> it seems this string-string form of regex_match and regex_replace are
> missing from the  functionality.
>
> On Tue, November 1, 2016 12:47 pm, NightStrike wrote:
>
>> On Tue, Nov 1, 2016 at 2:14 PM, Jim Michaels
>> 
>> wrote:
>>
>>
>>> problem with std::regex not fulfilling standard? for this code I got
>>> the below
>>>
>>> for (intmax_t i=0; i <
>>> regexPatterns.size()&&(findit=findIt||!std::regex_match(sline,
>>> std::regex(findstr, std::regex(regexPatterns[i],
>>> std::regex_constants::extended |
>>> (icase?std::regex_constants::icase:0)); i++);
>>>
>>>
>>
>> What are you trying to accomplish with this code?  It's difficult to
>> read.  You'll probably increase your likelihood of getting help if you
>> provide a clear, easily understood example that demonstrates a problem,
>>  and specify exactly what that problem is.  Putting the contents of
>> your loop in an unreadable forloop while condition means that we have to
>>  untangle your snippet to even start to help you.  I doubt that anyone
>> will be willing to help you unless you clean up your question.
>>
>> ---
>> --
>> -
>> Developer Access Program for Intel Xeon Phi Processors
>> Access to Intel Xeon Phi processor-based developer platforms.
>> With one year of Intel Parallel Studio XE.
>> Training and support from Colfax.
>> Order your platform today. http://sdm.link/xeonphi
>> ___
>> Mingw-w64-public mailing list
>> Mingw-w64-public@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>>
>>
>>
>
>
> --
> Jim Michaels
> jim.micha...@jesusnjim.com
>
>
> -
> -
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today. http://sdm.link/xeonphi
> ___
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
>


-- 
Jim Michaels
jim.micha...@jesusnjim.com


--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] std::regex not fulfilling standard? missing templates

2016-11-02 Thread Jim Michaels
namespace str {
std::string str::localestringlower(std::string s) {
//not sure if std::locale:: will solve conflicting namespaces
between  and 
for (size_t i=0; i < s.size(); i++) {
s[i]=std::tolower(s[i]);
}
return s;
}
}
here's another one, compile that and see if it throws error messages about
declaring a std::string in an arg. it's in a namespace str.


std::cout< >::value_type&, unsigned int)'

it seems this string-string form of regex_match and regex_replace are
missing from the  functionality.

On Tue, November 1, 2016 12:47 pm, NightStrike wrote:
> On Tue, Nov 1, 2016 at 2:14 PM, Jim Michaels 
> wrote:
>
>> problem with std::regex not fulfilling standard? for this code I got the
>> below
>>
>> for (intmax_t i=0; i <
>> regexPatterns.size()&&(findit=findIt||!std::regex_match(sline,
>> std::regex(findstr, std::regex(regexPatterns[i],
>> std::regex_constants::extended |
>> (icase?std::regex_constants::icase:0)); i++);
>>
>
> What are you trying to accomplish with this code?  It's difficult to
> read.  You'll probably increase your likelihood of getting help if you
> provide a clear, easily understood example that demonstrates a problem,
> and specify exactly what that problem is.  Putting the contents of your
> loop in an unreadable forloop while condition means that we have to
> untangle your snippet to even start to help you.  I doubt that anyone will
> be willing to help you unless you clean up your question.
>
> -
> -
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today. http://sdm.link/xeonphi
> ___
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
>


-- 
Jim Michaels
jim.micha...@jesusnjim.com


--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [PATCH] lib32 msvcrt add mkgmtime exports - XP support?

2016-11-02 Thread JonY
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On 11/2/2016 16:56, Adrien Nader wrote:
> Hi,
> 
> A small thread hijack.
> 
> On Mon, Oct 31, 2016, Martell Malone wrote:
>> Hey guys,
>> 
>> My only concern is if this is supported on windows xp. 
>> https://msdn.microsoft.com/en-us/library/2093ets1.aspx MSDN has a
>> doc version from VS2005. I don't see anything about a min windows
>> version there. We already have this in the lib64 variant. So all
>> indicators are good.
> 
> Some time ago there has been a conversation about XP support and v5
> and future versions on IRC. And basically it said that XP support
> could be dropped after v5. So, what's the status?
> 

I'm OK with this, Kai?

-BEGIN PGP SIGNATURE-

iF4EAREIAAYFAlgadmQACgkQk721PNTrx0DPyAEAnU8i5dkxxWAwVG8dQCC/D6be
QkD1asdEl0Q936qRMzMA/0/pViuDE88V6L9fIWN41LVwzsUIIau1pdZPAHMS8mSz
=ppfV
-END PGP SIGNATURE-
--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [PATCH] lib32 msvcrt add mkgmtime exports - XP support?

2016-11-02 Thread Adrien Nader
Hi,

A small thread hijack.

On Mon, Oct 31, 2016, Martell Malone wrote:
> Hey guys,
> 
> My only concern is if this is supported on windows xp.
> https://msdn.microsoft.com/en-us/library/2093ets1.aspx
> MSDN has a doc version from VS2005.
> I don't see anything about a min windows version there.
> We already have this in the lib64 variant.
> So all indicators are good.

Some time ago there has been a conversation about XP support and v5 and
future versions on IRC. And basically it said that XP support could be
dropped after v5. So, what's the status?

-- 
Adrien Nader

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public