[libcxx-commits] [libcxx] 2d8f23f - [libc++] Explicitly mark basic_string<...>::npos with default
Martin Storsjö via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Feb 2 14:01:46 PST 2020
On Thu, 16 Jan 2020, Martin Storsjö via libcxx-commits wrote:
> Hi,
>
> Yes, adding _LIBCPP_FUNC_VIS on line 788 in libcxx/include/string helps, for
> both msvc and mingw mode. I haven't tested linking code that references npos
> against that dll though but it builds at least.
I ran into this issue again now, building code with libcxx in MSVC mode:
In file included from
/home/martin/code/llvm-project/libcxx/test/std/strings/string.classes/typedefs.pass.cpp:20:
/home/martin/code/llvm-project/libcxx/include/string:4242:59: error:
definition of dllimport static field
[-Werror,-Wdllimport-static-field-def]
basic_string<_CharT, _Traits, _Allocator>::npos;
^
/home/martin/code/llvm-project/libcxx/include/string:4240:1: note:
attribute is here
_LIBCPP_FUNC_VIS
^
/home/martin/code/llvm-project/libcxx/include/__config:631:37: note:
expanded from macro '_LIBCPP_FUNC_VIS'
#define _LIBCPP_FUNC_VIS _LIBCPP_DLL_VIS
^
/home/martin/code/llvm-project/libcxx/include/__config:623:38: note:
expanded from macro '_LIBCPP_DLL_VIS'
# define _LIBCPP_DLL_VIS __declspec(dllimport)
^
1 error generated.
(This error doesn't seem to show up in mingw mode, only in MSVC mode.)
// Martin
More information about the libcxx-commits
mailing list