Add C++11 const char* overloads for exception classes.

2012-10-26 Thread Ed Smith-Rowland
Committed. 2012-10-26 Edward Smith-Rowland 3dw...@verizon.net * include/std/system_error (system_error(error_code, const char*), system_error(int, const error_category, const char*)): New. * include/std/stdexcept ( logic_error(const char*), domain_error(const

Re: Add C++11 const char* overloads for exception classes.

2012-10-26 Thread Ed Smith-Rowland
On 10/26/2012 10:26 AM, Paolo Carlini wrote: On 10/26/2012 04:11 PM, Ed Smith-Rowland wrote: Committed. I can't find the message actually approving the patch. And personally I'm a bit nervous about it. Paolo. Sorry, i though it was OK. Do you want me to roll back? do you want to? Ed

Re: Add C++11 const char* overloads for exception classes.

2012-10-26 Thread Ed Smith-Rowland
On 10/26/2012 10:26 AM, Paolo Carlini wrote: On 10/26/2012 04:11 PM, Ed Smith-Rowland wrote: Committed. I can't find the message actually approving the patch. And personally I'm a bit nervous about it. Paolo. Well, the commit had failed anyway... ChangeLog out of date. So I'll wait. Ed

Re: Add the Hoyt and the arcsine distributions as extensions.

2012-10-12 Thread Ed Smith-Rowland
On 10/12/2012 10:50 AM, Paolo Carlini wrote: On 10/12/2012 04:19 PM, Ed Smith-Rowland wrote: These are my last two random distribution extensions for now. Thanks a lot! The main on is the Hoyt distribution (AKA the Nakagami-q distribution). It uses the arcsine with specified basis

Re: Implement Pareto distribution as an extension.

2012-09-21 Thread Ed Smith-Rowland
On 09/21/2012 05:33 AM, Paolo Carlini wrote: On 09/21/2012 11:02 AM, Ulrich Drepper wrote: On Thu, Sep 20, 2012 at 6:17 AM, Paolo Carlini paolo.carl...@oracle.com wrote: Patch looks generally Ok to me. If Ulrich and the other interested parties don't have anything to add over the next 24 hrs

Re: Implement Nakagami distribution as an extension.

2012-09-18 Thread Ed Smith-Rowland
On 09/18/2012 10:28 AM, Paolo Carlini wrote: On 09/18/2012 03:23 AM, Ed Smith-Rowland wrote: Here is another tweak for the Nakagami distribution. operator() is a one liner without a local variable. The template friend is fixed and the relevant test has been added. Changed dates

Add Rice distribution to libstdc++

2012-09-16 Thread Ed Smith-Rowland
This adds the Rice distribution to the C++11 random facility and a Gnu extension. 2012-09-14 Edward Smith-Rowland 3dw...@verizon.net * include/ext/random: Add __gnu_cxx::rice_distribution class. * include/ext/random.tcc: Add out-of-line functions for

Fix small paste-o in rice_distribution.

2012-09-16 Thread Ed Smith-Rowland
I initialized an adapted urng that was not needed or used in the rice_distribution extension. 2012-09-16 Edward Smith-Rowland 3dw...@verizon.net * include/ext/random.tcc (__gnu_cxx::rice_distribution ::__generate_impl): Remove bogus _Adaptor usage. Index:

Re: random numbers in bulk

2012-08-25 Thread Ed Smith-Rowland
On 08/25/2012 07:39 PM, Ulrich Drepper wrote: On Sat, Aug 25, 2012 at 7:37 PM, Jonathan Wakely jwakely@gmail.com wrote: But iterators don't have to imply non-sequential storage. Using iterators instead of pointers would allow you to store them in a std::deque, for example, or in a

Re: Add noexcept and constexpr to tr2/dynamic_bitset.

2012-06-25 Thread Ed Smith-Rowland
On 06/24/2012 07:18 AM, Jonathan Wakely wrote: On 24 June 2012 12:18, Jonathan Wakely wrote: On 24 June 2012 05:00, Ed Smith-Rowland wrote: Subject says it. This looks good, please CC gcc-patches with a changelog entry and confirmation it was tested and it can go in. Thanks. And don't

Re: constexpr for tr2/bool_set.

2012-06-25 Thread Ed Smith-Rowland
On 06/24/2012 07:19 AM, Jonathan Wakely wrote: This looks good too, again please CC gcc-patches with a changelog entry and confirmation it was tested and it can go in. Thanks. Built and tested on x86_64-linux-gnu. 2012-06-25 Edward Smith-Rowland 3dw...@verizon.net *

Re: We left out the check for param_type in random distributions

2012-02-22 Thread Ed Smith-Rowland
Hi, Built and tested on x86_64-linux-gnu. Seems safe enough to go in now, Ok. Thanks, Paolo. 2012-02-14 Edward Smith-Rowland 3dw...@verizon.net * testsuite/26_numerics/random/ uniform_real_distribution/requirements/typedefs.cc: Check param_type. *

[C++ PATCH] ICE with invalid user-defined literals (PR c++/51420)

2011-12-06 Thread Ed Smith-Rowland
gcc/testsuite: 2011-12-06 Ed Smith-Rowland 3dw...@verizon.net PR c++/51420 * g++.dg/cpp0x/pr51420.C: New. gcc/cp: 2011-12-06 Ed Smith-Rowland 3dw...@verizon.net PR c++/51420 * parser.c (lookup_literal_operator): Check that current overload is function_type.

[C++ PATCH] ICE with invalid user-defined literals (PR c++/51420)

2011-12-06 Thread Ed Smith-Rowland
This time with patch. gcc/testsuite: 2011-12-06 Ed Smith-Rowland 3dw...@verizon.net PR c++/51420 * g++.dg/cpp0x/pr51420.C: New. gcc/cp: 2011-12-06 Ed Smith-Rowland 3dw...@verizon.net PR c++/51420 * parser.c (lookup_literal_operator): Check that current overload

Re: [C++ PATCH] ICE with invalid user-defined literals (PR c++/51420)

2011-12-06 Thread Ed Smith-Rowland
On 12/06/2011 02:27 PM, Jason Merrill wrote: On 12/06/2011 08:21 AM, Ed Smith-Rowland wrote: * parser.c (lookup_literal_operator): Check that current overload is function_type. Instead of checking here, let's check is_overloaded_fn (decl) right after the lookup name. Jason OK

[C++11] Ping on PR50958

2011-11-20 Thread Ed Smith-Rowland
Ping. There's a patch that should do the literal operator resolution correctly and resolve PR50958: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50958 Thanks, Ed

[C++11] Streamline user-defined literal error messages and some code reformatting.

2011-11-15 Thread Ed Smith-Rowland
I just wanted to do a little clean up on the user-defined literal code. Index: gcc/testsuite/g++.dg/cpp0x/udlit-raw-op-string-neg.C === --- gcc/testsuite/g++.dg/cpp0x/udlit-raw-op-string-neg.C(revision 181376) +++

Fwd: [C++ PATCH] PR 50958 and correct lookup of literal operators

2011-11-08 Thread Ed Smith-Rowland
== CPP_WCHAR_USERDEF) return CPP_WCHAR; else if (type == CPP_CHAR16_USERDEF) -return CPP_STRING16; +return CPP_CHAR16; else if (type == CPP_CHAR32_USERDEF) -return CPP_STRING32; +return CPP_CHAR32; else return type; } 2011-10-30 Ed Smith-Rowland 3dw...@verizon.net

[C++ PATCH] PR 50958 and correct lookup of literal operators

2011-11-06 Thread Ed Smith-Rowland
CPP_CHAR32; else return type; } 2011-10-30 Ed Smith-Rowland 3dw...@verizon.net * gcc/testsuite/g++.dg/cpp0x/udlit-raw-length.C: New. * gcc/testsuite/g++.dg/cpp0x/udlit-implicit-conv-neg.C: New. * gcc/testsuite/g++.dg/cpp0x/udlit-resolve.C: New. * gcc

[C++11 Patch] PR 50941

2011-11-03 Thread Ed Smith-Rowland
) + / TREE_INT_CST_LOW (TYPE_SIZE_UNIT ( TREE_TYPE(TREE_TYPE (value - 1; /* Build up a call to the user-defined operator */ /* Lookup the name we got back from the id-expression. */ vec = make_tree_vector (); 2011-11-02 Ed Smith-Rowland 3dw...@verizon.net DR c++/50941

Re: [C++11 Patch] PR 50941

2011-11-03 Thread Ed Smith-Rowland
On 11/03/2011 08:50 AM, Paolo Carlini wrote: On 11/03/2011 12:56 PM, Ed Smith-Rowland wrote: + len = TREE_STRING_LENGTH (value) +/ TREE_INT_CST_LOW (TYPE_SIZE_UNIT ( TREE_TYPE(TREE_TYPE (value - 1; ... with open brackets in random positions ;) Paolo. Arrrgh! ;-) Here's a new

Re: [C++-11] User defined literals

2011-10-30 Thread Ed Smith-Rowland
On 10/27/2011 03:47 PM, Jason Merrill wrote: On 10/27/2011 03:32 PM, Ed Smith-Rowland wrote: + if (TREE_CODE (TREE_TYPE (decl)) != LANG_TYPE) +argtypes = TYPE_ARG_TYPES (TREE_TYPE (decl)); If you have multiple overloaded operator _foo, you need to iterate over them looking for the one

Re: [C++-11] User defined literals

2011-10-27 Thread Ed Smith-Rowland
On 10/26/2011 03:38 PM, Jason Merrill wrote: On 10/26/2011 02:00 AM, Ed Smith-Rowland wrote: The patch was bootstrapped and regtested on x86_64-linux-gnu. Really? I ran into a warning about the unused suffix parameter to interpret_integer. So I've fixed that error. I also added a couple

Re: [C++-11] User defined literals

2011-10-27 Thread Ed Smith-Rowland
On 10/26/2011 03:38 PM, Jason Merrill wrote: On 10/26/2011 02:00 AM, Ed Smith-Rowland wrote: The patch was bootstrapped and regtested on x86_64-linux-gnu. Really? I ran into a warning about the unused suffix parameter to interpret_integer. So I've fixed that error. I also added a couple

Re: [C++-11] User defined literals

2011-10-23 Thread Ed Smith-Rowland
On 10/21/2011 05:20 PM, Jason Merrill wrote: I think we're down to minor cosmetic issues: On 10/21/2011 03:55 PM, Tom Tromey wrote: There are a few spots like this that are missing a space before an open paren. + if (DECL_LANGUAGE(decl) == lang_c) Another one. - if

Re: [v3] tr2: bool_set, dynamic_bitset, ratio

2011-10-19 Thread Ed Smith-Rowland
On 10/19/2011 06:48 PM, Benjamin Kosnik wrote: Hi Edward! I have reviewed and selectively merged your development branch, libstdcxx-tr2-ideas-branch, into trunk. As ISO C++ is now looking at new library efforts for TR2 (and N2965 has already been checked in to trunk) I thought it well-timed.

Re: [C++-11] User defined literals

2011-10-11 Thread Ed Smith-Rowland
On 10/11/2011 12:57 PM, Jason Merrill wrote: On 10/11/2011 12:55 PM, Jason Merrill wrote: On 10/09/2011 07:19 PM, Ed Smith-Rowland wrote: Does cp_parser_identifier (parser) *not* consume the identifier token? I'm pretty sure it does. It does. Does it work to only complain

Re: [C++-11] User defined literals

2011-10-09 Thread Ed Smith-Rowland
On 10/08/2011 07:15 PM, Jason Merrill wrote: On 10/08/2011 07:25 PM, Ed Smith-Rowland wrote: Also, In spite of the documentation cp_parser_template_parameter_list returns a TREE_VEC not a TREE_LIST. This happens inside end_template_parm_list called inside the former. So parameter_list

Re: [v3] add scoped_allocator

2011-07-20 Thread Ed Smith-Rowland
above, in r176079 All, Here is a trivial addition to include scoped_allocator in the precompiled headers. It bootstrapped and regtested on x86_64 linux. Ed 2011-07-20 Ed Smith-Rowland 3dw...@verizon.net * include/precompiled/stdc++.h: Add scoped_allocator. Index: include/precompiled

Re: [C++-0x] User defined literals.

2011-07-17 Thread Ed Smith-Rowland
On 07/12/2011 04:56 PM, Jason Merrill wrote: A few more notes: + if (DECL_NAMESPACE_SCOPE_P (decl)) + { + if (!check_literal_operator_args(decl, + long_long_unsigned_p, long_double_p)) + { + error (%qD has illegal argument list, decl); +

<    1   2   3   4