[ConceptGCC] |
ConceptGCC :Splitting out implementations? |
From: Ciaran McCreesh (ciaran.mccreesh_at_[hidden])
Date: 2007-11-02 08:46:12
I'm fairly sure I'm missing something obvious here...
#include <concepts>
#include <iterator>
template <typename T_>
requires std::ForwardIterator<T_>
struct F
{
F();
};
template <typename T_>
requires std::ForwardIterator<T_>
F<T_>::F()
{
}
gives:
a.cc:14: error: invalid use of incomplete type âstruct F<T_>â
a.cc:8: error: declaration of âstruct F<T_>â
a.cc:14: error: template definition of non-template âF<T_>::F()â
And
template <typename T_>
F<T_>::F()
{
}
gives:
a.cc:13: error: new declaration âF<T_>::F()â
a.cc:9: error: ambiguates old declaration âF<T_>::F()â
What's the correct way of splitting out the implementation?
Thanks,
-- Ciaran McCreesh