From 3017ad7dc059a32d6ce33fb6ca1e7acd845e0e03 Mon Sep 17 00:00:00 2001 From: Vincent Chabannes Date: Sat, 24 Aug 2024 17:29:55 +0200 Subject: [PATCH] bug not depend of napp --- test/bug-ftbs-gcc.cpp | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/test/bug-ftbs-gcc.cpp b/test/bug-ftbs-gcc.cpp index 212b700..964ecb8 100644 --- a/test/bug-ftbs-gcc.cpp +++ b/test/bug-ftbs-gcc.cpp @@ -1,7 +1,16 @@ -#include +//! -using element1 = NA::named_argument_t; -constexpr auto& _element1 = NA::identifier; +struct A {}; + +struct B +{ + constexpr B() = default; + B(const B&) = delete; + B& operator=(const B&) = delete; + + template + constexpr A operator=(V && v) const { return A{}; } +}; template void func( Ts && v ) @@ -9,14 +18,22 @@ void func( Ts && v ) // body } +template +void func2( Ts const& v ) +{ + +} + // NOTE: g++ compilation error only when use a template template class Foo { public: Foo(){ - func( _element1=("toto") ); // error - func( _element1.operator=("toto") ); // OK + B b; + func( b=3 ); // error + func( b.operator=(3) ); // OK + func2( b=3 ); // OK } };