Home Dashboard Directory Help
Search

Compile error with explicitly specified template arguments by svenschmidt75


Status: 

Active


1
0
Sign in
to vote
Type: Bug
ID: 790269
Opened: 6/16/2013 10:26:00 AM
Access Restriction: Public
1
Workaround(s)
view
0
User(s) can reproduce this bug

Description

Compiling yields an error:

1>------ Build started: Project: TemplateArgumentDeduction, Configuration: Debug Win32 ------
1>Build started 6/16/2013 12:22:42 PM.
1>InitializeBuildStatus:
1> Touching "Debug\TemplateArgumentDeduction.unsuccessfulbuild".
1>ClCompile:
1> All outputs are up-to-date.
1> TemplateArgumentDeduction.cpp
1>c:\users\sven\downloads\templateargumentdeduction - copy\templateargumentdeduction\templateargumentdeduction.cpp(40): error C2770: invalid explicit template argument(s) for 'std::enable_if<false,VectorBinaryExpr<T1,T2,double>>::type foo(T1,T2)'
1>         c:\users\sven\downloads\templateargumentdeduction - copy\templateargumentdeduction\templateargumentdeduction.cpp(30) : see declaration of 'foo'
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:00.13
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Details
Sign in to post a comment.
Posted by Microsoft on 7/9/2013 at 11:22 PM
We've also provided a workaround. See the workarounds tab.
Posted by Microsoft on 7/9/2013 at 11:21 PM
Hi s-schmidt,

Thank you for taking the time to provide your feedback. After reviewing your reported issue, in the context of all the issues reported to us, we have decided not to take any action on this feedback at this time. We will re-consider our decision for a future release.

If this issue is severe, causing critical business situations or blocking your product development or deployment, please go to http://support.microsoft.com or call 1-800-MICROSOFT for assistance.
For Microsoft premier customers, please contact your administrator, your Technical Account Manager, or your Microsoft premier account representative.

Thanks,
Karl Niu
Posted by Microsoft on 6/16/2013 at 8:01 PM
Thank you for submitting feedback on Visual Studio and .NET Framework. Your issue has been routed to the appropriate VS development team for investigation. We will contact you if we require any additional information.
Posted by Microsoft on 6/16/2013 at 10:51 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.
Posted by Microsoft on 7/9/2013 at 11:21 PM
template<typename EXPR>
struct expression_traits {
typedef std::false_type is_vector_expression;
enum {value = is_vector_expression::value};
};

template<>
struct expression_traits<Vector> {
typedef std::true_type is_vector_expression;
enum {value = is_vector_expression::value};
};

And use 'expression_traits<type>::value' directly.