[Insight-developers] new clang compile errors since Aug 26

Tom Vercauteren tom.vercauteren at m4x.org
Tue Sep 13 03:23:53 EDT 2011


Hey,

It looks like the legit declaration* should be
  using typename TemplatedType<T>::Type;
and NOT
  using TemplatedType<T>::Type;

Hence, clang seems right here. If other compilers do not support this
construction, why not simply use a typedef in this case?
  typedef typename TemplatedType<T>::Type Type;

All compilers supported by ITK should support this typedef.

My two cents,
Tom

*: http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#11
http://stackoverflow.com/questions/1071119/c-accessing-types-from-dependent-base-classes
http://llvm.org/bugs/show_bug.cgi?id=10725

On Tue, Sep 13, 2011 at 04:17, Bradley Lowekamp <blowekamp at mail.nih.gov> wrote:
> This is as small as I was able to get the error message down to:
>
> template<typename T>
> struct TemplatedType{ typedef int Type;};
>
> template< typename T >
> class TemplatedTypeUser:
>  public TemplatedType<T> {
>  using TemplatedType<T>::Type;
> };
>
> int main( void )
> {
>  TemplatedTypeUser<int>::Type i = 0;
>  return i;
> }
>
>
>
> On Sep 12, 2011, at 4:16 PM, Sean McBride wrote:
>
>> On Mon, 12 Sep 2011 16:10:21 -0400, Bradley Lowekamp said:
>>
>>> Has there been any progress with ITK's threading model working with
>>> clang? Last I recalled most multi-threaded tests failed, rendering this
>>> not a usable compiler with ITK.
>>
>> It's hard to progress on that when ITK won't even build. :)
>>
>> --
>> ____________________________________________________________
>> Sean McBride, B. Eng                 sean at rogue-research.com
>> Rogue Research                        www.rogue-research.com
>> Mac Software Developer              Montréal, Québec, Canada
>>
>>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-developers
>


More information about the Insight-developers mailing list