[Bug c++/94819] [10 Regression] Inherited and constrained constructors are "ambiguous" even if they aren't Pt. 2
daniel.kruegler at googlemail dot com
gcc-bugzilla@gcc.gnu.org
Tue Apr 28 17:04:51 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94819
Daniel Krügler <daniel.kruegler at googlemail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |daniel.kruegler@googlemail.
| |com
--- Comment #2 from Daniel Krügler <daniel.kruegler at googlemail dot com> ---
After removal of any library dependencies:
```c++
template<class, class>
inline constexpr bool is_same_v = false;
template<class T>
inline constexpr bool is_same_v<T, T> = true;
template <typename component_types>
struct alphabet_tuple_base
{
template <typename component_type>
requires is_same_v<component_type, component_types>
constexpr alphabet_tuple_base(component_type) {} // commenting out
constexpr works?!
template <typename indirect_component_type>
requires (!is_same_v<indirect_component_type, component_types>)
alphabet_tuple_base(indirect_component_type) {}
};
template <typename sequence_alphabet_t>
struct structured_rna : alphabet_tuple_base<sequence_alphabet_t> {
using base_type = alphabet_tuple_base<sequence_alphabet_t>;
using base_type::base_type;
};
struct dna4 {};
struct rna4 {};
structured_rna<rna4> t1{rna4{}}; // commenting out any of these works?!
structured_rna<rna4> t2{dna4{}}; // commenting out any of these works?!
structured_rna<rna4> t3{rna4{}}; // commenting out any of these works?!
int main() {}
```
More information about the Gcc-bugs
mailing list