Skip to content
  1. Mar 30, 2010
  2. Mar 29, 2010
  3. Mar 28, 2010
    • Douglas Gregor's avatar
      After performing template argument deduction for a function template, · d5cb1ddb
      Douglas Gregor authored
      check deduced non-type template arguments and template template
      arguments against the template parameters for which they were deduced,
      performing conversions as appropriate so that deduced template
      arguments get the same treatment as explicitly-specified template
      arguments. This is the bulk of PR6723.
      
      Also keep track of whether deduction of a non-type template argument
      came from an array bound (vs. anywhere else). With this information,
      we enforce C++ [temp.deduct.type]p17, which requires exact type
      matches when deduction deduces a non-type template argument from
      something that is not an array bound.
      
      Finally, when in a SFINAE context, translate the "zero sized
      arrays are an extension" extension diagnostic into a hard error (for
      better standard conformance), which was a minor part of PR6723.
      
      llvm-svn: 99734
      d5cb1ddb
  4. Mar 27, 2010
  5. Mar 26, 2010
  6. Mar 25, 2010
    • Douglas Gregor's avatar
      Warn when the conversion of an integral non-type template argument to · 63eed633
      Douglas Gregor authored
      the type of its corresponding non-type template parameter changes the
      value. Previously, we were diagnosing this as an error, which was
      wrong. We give reasonably nice warnings like:
      
      test/SemaTemplate/temp_arg_nontype.cpp:100:10: warning: non-type template
            argument value '256' truncated to '0' for template parameter of type
            'unsigned char'
      Overflow<256> *overflow3; // expected-warning{{non-type template ...
               ^~~
      test/SemaTemplate/temp_arg_nontype.cpp:96:24: note: template parameter is
            declared here
      template<unsigned char C> struct Overflow;
                             ^
      
      llvm-svn: 99561
      63eed633
Loading