stdcxx-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Travis Vitek (JIRA)" <j...@apache.org>
Subject [jira] Updated: (STDCXX-975) [MSVC 8/9] template parsing fails when using less than comparison in metaprogramming conditional
Date Thu, 26 Jun 2008 21:11:44 GMT

     [ https://issues.apache.org/jira/browse/STDCXX-975?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Travis Vitek updated STDCXX-975:
--------------------------------

    Summary: [MSVC 8/9] template parsing fails when using less than comparison in metaprogramming
conditional  (was: [MSVC 8/9] Problems)

> [MSVC 8/9] template parsing fails when using less than comparison in metaprogramming
conditional
> ------------------------------------------------------------------------------------------------
>
>                 Key: STDCXX-975
>                 URL: https://issues.apache.org/jira/browse/STDCXX-975
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: External
>         Environment: MSVC 8.0, 9.0
>            Reporter: Travis Vitek
>
> The following code fails to compile under both MSVC 8.0 and 9.0.
> {noformat}
> template <bool Select, class TypeT, class TypeU>
> struct conditional
> {
>     typedef TypeT type;
> };
> template <class TypeT, class TypeU>
> struct conditional<false, TypeT, TypeU>
> {
>     typedef TypeU type;
> };
> template <class TypeT>
> struct size_of
> {
>     enum { value = sizeof (TypeT) };
> };
> template <class Type1, class Type2, class Type3, class Type4>
> struct largest
> {
>     typedef typename
>     conditional<(size_of<Type1>::value < size_of<Type2>::value),
>                      Type2, Type1>::type Type12;
>     typedef typename
>     conditional<(size_of<Type3>::value < size_of<Type4>::value),
>                      Type3, Type4>::type Type34;
> };
> {noformat}
> An issue has been filed with the vendor [here|http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=352178].

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message