- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The following code compiles fine with clang and g++ (-std=c++14) but fails with icc 2016:
#include <iostream> template<class Derived> struct ConstBase { template<bool T = true> int f() const { return 3; } }; template<class Derived> struct Base : ConstBase<Derived> { using ConstBase<Derived>::f; template<bool T = true> int f() { const Derived& derived = static_cast<const Derived&>(*this); return derived.f(); } }; struct A : Base<A> { }; int main() { A a; std::cout << a.f() << "\n"; return 0; }
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your report. I submitted this to the development team and I will let you know when I have more information (reference ID DPD200371618).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This issue is fixed in compiler version 16.0.1 (XE 2016 Update 1):
$ icpc -V -std=c++14 test.cpp
Intel(R) C++ Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 16.0.1.150 Build 20151021
Copyright (C) 1985-2015 Intel Corporation. All rights reserved.
Edison Design Group C/C++ Front End, version 4.10 (Oct 22 2015 02:30:09)
Copyright 1988-2014 Edison Design Group, Inc.
GNU ld version 2.23.52.0.1-16.el7 20130226

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page