Re: [CMake] [cmake-developers] C++11/C++14 doesn't work in check_cxx_source_compiles

2016-11-28 Thread Brad King
On 11/24/2016 01:43 PM, Roman Wüger wrote:
> Shouldn't this be done by CMAKE_CXX_STANDARD?

Yes, this is a known problem with try_compile.  It needs to learn to honor
the CMAKE__STANDARD.  CMake itself works around this problem in some
cases, e.g.

* 
https://gitlab.kitware.com/cmake/cmake/blob/v3.7.0/Source/Checks/cm_cxx14_cstdio.cmake#L8

Here is a new issue for this:

* https://gitlab.kitware.com/cmake/cmake/issues/16456

-Brad

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] [cmake-developers] C++11/C++14 doesn't work in check_cxx_source_compiles

2016-11-25 Thread Craig Scott
Sorry, bad link in that last email. The try_compile() docs I meant to link
to are here:

https://cmake.org/cmake/help/latest/command/try_compile.html#other-behavior-settings


On Sat, Nov 26, 2016 at 9:23 AM, Craig Scott 
wrote:

> Sorry, I misunderstood. I had a look through the
> check_cxx_source_compiles() implementation and it basically forwards
> through to a try_compile() call. Looking at the docs for try_compile(),
> it says only the following are passed through to the temporary CMake
> project created for the test compilation:
>
>
>- CMAKE_ENABLE_EXPORTS
>- CMAKE_LINK_SEARCH_START_STATIC
>- CMAKE_LINK_SEARCH_END_STATIC
>- CMAKE_POSITION_INDEPENDENT_CODE
>
> A few more can be passed through depending on policy settings, but it
> looks like CMAKE_CXX_STANDARD, CMAKE_CXX_STANDARD_REQUIRED and
> CMAKE_CXX_EXTENSIONS don't get passed through. So it looks like, at the
> moment, you would have to manually pass through the relevant compiler and
> linker flags to get sources built via try_compile() and therefore via
> check_cxx_source_compiles(). I've recorded a new issue
>  in the issue
> tracker for this.
>
>
>
>
>
> On Fri, Nov 25, 2016 at 9:25 PM, Roman Wüger  wrote:
>
>> but it does not set/add the required library
>>
>> Am 24.11.2016 um 22:01 schrieb Craig Scott :
>>
>> You might also need to set CMAKE_CXX_EXTENSIONS
>> 
>> to OFF (it's ON by default). This controls which c++ library is linked for
>> some compilers, with clang and gcc being two cases where it does this. You
>> may also find this article
>>  about the
>> related CMake variables and commands to be of interest.
>>
>> On Fri, Nov 25, 2016 at 5:43 AM, Roman Wüger  wrote:
>>
>>> It is working now, after I added -lc++ to CMAKE_REQUIRED_LIBRARIES
>>> before the check_cxx_source_compiles() call.
>>>
>>> Shouldn't this be done by CMAKE_CXX_STANDARD?
>>>
>>> Best Regards
>>> Roman
>>>
>>> Am 24.11.2016 um 19:08 schrieb Roman Wüger :
>>>
>>> Hello,
>>>
>>>
>>>
>>> If I use a small piece of code which uses , then it fails with
>>> check_cxx_source_compiles. If I copy the piece of code into a file and run
>>> the following on the command line, then it works:
>>>
>>>
>>>
>>> clang++ main.cpp -std=c++14 -stdlib=libc++
>>>
>>>
>>>
>>> Here is the piece of code:
>>>
>>>
>>>
>>> #include 
>>>
>>> #include 
>>>
>>>
>>>
>>> int main() {
>>>
>>> const std::string text = "Roses are #ff, other flowers have
>>> other colors.";
>>>
>>> const std::regex pattern("#([a-f0-9]{2})");
>>>
>>>
>>>
>>> std::smatch match;
>>>
>>> std::regex_search(text, match, pattern);
>>>
>>>
>>>
>>> return 0;
>>>
>>> }
>>>
>>>
>>>
>>> I use this code in CMake as a platform check as followed:
>>>
>>>
>>>
>>> # C++11 Regular Expression
>>>
>>> set(CMAKE_REQUIRED_FLAGS "${CMAKE_CXX_FLAGS}")
>>>
>>> check_cxx_source_compiles(
>>>
>>>   "#include 
>>>
>>>#include 
>>>
>>>
>>>
>>>int main() {
>>>
>>>const std::string text = \"Roses are #ff, other flowers have
>>> other colors.\";
>>>
>>>const std::regex pattern(\"#([a-f0-9]{2})\");
>>>
>>>
>>>
>>>std::smatch match;
>>>
>>>std::regex_search(text, match, pattern);
>>>
>>>
>>>
>>>return 0;
>>>
>>>}"
>>>
>>>   HAVE_CXX11_REGULAR_EXPRESSIONS
>>>
>>> )
>>>
>>> set(CMAKE_REQUIRED_FLAGS "")
>>>
>>>
>>>
>>> CMakeFiles/CMakeError.log shows:
>>>
>>>
>>>
>>> Undefined symbols for architecture x86_64:
>>>
>>>   "std::__1::basic_string>> std::__1::allocator >::compare(char const*) const", referenced from:
>>>
>>>   std::__1::basic_regex>> >::__start_matching_list(bool) in src.o
>>>
>>>   "std::__1::__vector_base_common::__throw_length_error() const",
>>> referenced from:
>>>
>>>   std::__1::vector>> std::__1::allocator
>>> >::assign(unsigned long, std::__1::sub_match const&) in src.o
>>>
>>>   std::__1::vector>> std::__1::allocator
>>> >::allocate(unsigned long) in src.o
>>>
>>>   void std::__1::vector>> std::__1::allocator
>>> >::__push_back_slow_path>> >(std::__1::__state&&) in src.o
>>>
>>>   std::__1::vector>> std::__1::allocator
>>> >::__append(unsigned long, std::__1::sub_match const&) in src.o
>>>
>>>   std::__1::vector>> std::__1::allocator
>>> >::__append(unsigned long) in src.o
>>>
>>>   std::__1::vector>> std::__1::allocator
>>> >::allocate(unsigned long) in src.o
>>>
>>>   void std::__1::vector

Re: [CMake] [cmake-developers] C++11/C++14 doesn't work in check_cxx_source_compiles

2016-11-25 Thread Craig Scott
Sorry, I misunderstood. I had a look through the
check_cxx_source_compiles() implementation and it basically forwards
through to a try_compile() call. Looking at the docs for try_compile()
,
it says only the following are passed through to the temporary CMake
project created for the test compilation:


   - CMAKE_ENABLE_EXPORTS
   - CMAKE_LINK_SEARCH_START_STATIC
   - CMAKE_LINK_SEARCH_END_STATIC
   - CMAKE_POSITION_INDEPENDENT_CODE

A few more can be passed through depending on policy settings, but it looks
like CMAKE_CXX_STANDARD, CMAKE_CXX_STANDARD_REQUIRED and
CMAKE_CXX_EXTENSIONS don't get passed through. So it looks like, at the
moment, you would have to manually pass through the relevant compiler and
linker flags to get sources built via try_compile() and therefore via
check_cxx_source_compiles(). I've recorded a new issue
 in the issue tracker
for this.





On Fri, Nov 25, 2016 at 9:25 PM, Roman Wüger  wrote:

> but it does not set/add the required library
>
> Am 24.11.2016 um 22:01 schrieb Craig Scott :
>
> You might also need to set CMAKE_CXX_EXTENSIONS
> 
> to OFF (it's ON by default). This controls which c++ library is linked for
> some compilers, with clang and gcc being two cases where it does this. You
> may also find this article
>  about the
> related CMake variables and commands to be of interest.
>
> On Fri, Nov 25, 2016 at 5:43 AM, Roman Wüger  wrote:
>
>> It is working now, after I added -lc++ to CMAKE_REQUIRED_LIBRARIES before
>> the check_cxx_source_compiles() call.
>>
>> Shouldn't this be done by CMAKE_CXX_STANDARD?
>>
>> Best Regards
>> Roman
>>
>> Am 24.11.2016 um 19:08 schrieb Roman Wüger :
>>
>> Hello,
>>
>>
>>
>> If I use a small piece of code which uses , then it fails with
>> check_cxx_source_compiles. If I copy the piece of code into a file and run
>> the following on the command line, then it works:
>>
>>
>>
>> clang++ main.cpp -std=c++14 -stdlib=libc++
>>
>>
>>
>> Here is the piece of code:
>>
>>
>>
>> #include 
>>
>> #include 
>>
>>
>>
>> int main() {
>>
>> const std::string text = "Roses are #ff, other flowers have other
>> colors.";
>>
>> const std::regex pattern("#([a-f0-9]{2})");
>>
>>
>>
>> std::smatch match;
>>
>> std::regex_search(text, match, pattern);
>>
>>
>>
>> return 0;
>>
>> }
>>
>>
>>
>> I use this code in CMake as a platform check as followed:
>>
>>
>>
>> # C++11 Regular Expression
>>
>> set(CMAKE_REQUIRED_FLAGS "${CMAKE_CXX_FLAGS}")
>>
>> check_cxx_source_compiles(
>>
>>   "#include 
>>
>>#include 
>>
>>
>>
>>int main() {
>>
>>const std::string text = \"Roses are #ff, other flowers have
>> other colors.\";
>>
>>const std::regex pattern(\"#([a-f0-9]{2})\");
>>
>>
>>
>>std::smatch match;
>>
>>std::regex_search(text, match, pattern);
>>
>>
>>
>>return 0;
>>
>>}"
>>
>>   HAVE_CXX11_REGULAR_EXPRESSIONS
>>
>> )
>>
>> set(CMAKE_REQUIRED_FLAGS "")
>>
>>
>>
>> CMakeFiles/CMakeError.log shows:
>>
>>
>>
>> Undefined symbols for architecture x86_64:
>>
>>   "std::__1::basic_string> std::__1::allocator >::compare(char const*) const", referenced from:
>>
>>   std::__1::basic_regex> >::__start_matching_list(bool) in src.o
>>
>>   "std::__1::__vector_base_common::__throw_length_error() const",
>> referenced from:
>>
>>   std::__1::vector> std::__1::allocator
>> >::assign(unsigned long, std::__1::sub_match const&) in src.o
>>
>>   std::__1::vector> std::__1::allocator
>> >::allocate(unsigned long) in src.o
>>
>>   void std::__1::vector> std::__1::allocator
>> >::__push_back_slow_path> >(std::__1::__state&&) in src.o
>>
>>   std::__1::vector> std::__1::allocator
>> >::__append(unsigned long, std::__1::sub_match const&) in src.o
>>
>>   std::__1::vector> std::__1::allocator
>> >::__append(unsigned long) in src.o
>>
>>   std::__1::vector> std::__1::allocator
>> >::allocate(unsigned long) in src.o
>>
>>   void std::__1::vector> >::__push_back_slow_path(char&&) in src.o
>>
>>   ...
>>
>>   "std::__1::__basic_string_common::__throw_length_error() const",
>> referenced from:
>>
>>   std::__1::enable_if<__is_forward_iterator::value,
>> void>::type std::__1::basic_string> std::__1::allocator >::__init(char*, char*) in src.o
>>
>>   std::__1::enable_if<__is_forward_iterator::value,
>> void>::type 

Re: [CMake] [cmake-developers] C++11/C++14 doesn't work in check_cxx_source_compiles

2016-11-25 Thread Roman Wüger
but it does not set/add the required library

> Am 24.11.2016 um 22:01 schrieb Craig Scott :
> 
> You might also need to set CMAKE_CXX_EXTENSIONS to OFF (it's ON by default). 
> This controls which c++ library is linked for some compilers, with clang and 
> gcc being two cases where it does this. You may also find this article about 
> the related CMake variables and commands to be of interest.
> 
>> On Fri, Nov 25, 2016 at 5:43 AM, Roman Wüger  wrote:
>> It is working now, after I added -lc++ to CMAKE_REQUIRED_LIBRARIES before 
>> the check_cxx_source_compiles() call.
>> 
>> Shouldn't this be done by CMAKE_CXX_STANDARD?
>> 
>> Best Regards
>> Roman
>> 
>>> Am 24.11.2016 um 19:08 schrieb Roman Wüger :
>>> 
>>> Hello,
>>> 
>>>  
>>> 
>>> If I use a small piece of code which uses , then it fails with 
>>> check_cxx_source_compiles. If I copy the piece of code into a file and run 
>>> the following on the command line, then it works:
>>> 
>>>  
>>> 
>>> clang++ main.cpp -std=c++14 -stdlib=libc++
>>> 
>>>  
>>> 
>>> Here is the piece of code:
>>> 
>>>  
>>> 
>>> #include 
>>> 
>>> #include 
>>> 
>>>  
>>> 
>>> int main() {
>>> 
>>> const std::string text = "Roses are #ff, other flowers have other 
>>> colors.";
>>> 
>>> const std::regex pattern("#([a-f0-9]{2})");
>>> 
>>>  
>>> 
>>> std::smatch match;
>>> 
>>> std::regex_search(text, match, pattern);
>>> 
>>>  
>>> 
>>> return 0;
>>> 
>>> }
>>> 
>>>  
>>> 
>>> I use this code in CMake as a platform check as followed:
>>> 
>>>  
>>> 
>>> # C++11 Regular Expression
>>> 
>>> set(CMAKE_REQUIRED_FLAGS "${CMAKE_CXX_FLAGS}")
>>> 
>>> check_cxx_source_compiles(
>>> 
>>>   "#include 
>>> 
>>>#include 
>>> 
>>>  
>>> 
>>>int main() {
>>> 
>>>const std::string text = \"Roses are #ff, other flowers have 
>>> other colors.\";
>>> 
>>>const std::regex pattern(\"#([a-f0-9]{2})\");
>>> 
>>>  
>>> 
>>>std::smatch match;
>>> 
>>>std::regex_search(text, match, pattern);
>>> 
>>>  
>>> 
>>>return 0;
>>> 
>>>}"
>>> 
>>>   HAVE_CXX11_REGULAR_EXPRESSIONS
>>> 
>>> )
>>> 
>>> set(CMAKE_REQUIRED_FLAGS "")
>>> 
>>>  
>>> 
>>> CMakeFiles/CMakeError.log shows:
>>> 
>>>  
>>> 
>>> Undefined symbols for architecture x86_64:
>>> 
>>>   "std::__1::basic_string>> std::__1::allocator >::compare(char const*) const", referenced from:
>>> 
>>>   std::__1::basic_regex>> >::__start_matching_list(bool) in src.o
>>> 
>>>   "std::__1::__vector_base_common::__throw_length_error() const", 
>>> referenced from:
>>> 
>>>   std::__1::vector>> std::__1::allocator >::assign(unsigned 
>>> long, std::__1::sub_match const&) in src.o
>>> 
>>>   std::__1::vector>> std::__1::allocator >::allocate(unsigned 
>>> long) in src.o
>>> 
>>>   void std::__1::vector>> std::__1::allocator 
>>> >::__push_back_slow_path>> >(std::__1::__state&&) in src.o
>>> 
>>>   std::__1::vector>> std::__1::allocator >::__append(unsigned 
>>> long, std::__1::sub_match const&) in src.o
>>> 
>>>   std::__1::vector>> std::__1::allocator 
>>> >::__append(unsigned long) in src.o
>>> 
>>>   std::__1::vector>> std::__1::allocator 
>>> >::allocate(unsigned long) in src.o
>>> 
>>>   void std::__1::vector>> >::__push_back_slow_path(char&&) in src.o
>>> 
>>>   ...
>>> 
>>>   "std::__1::__basic_string_common::__throw_length_error() const", 
>>> referenced from:
>>> 
>>>   std::__1::enable_if<__is_forward_iterator::value, void>::type 
>>> std::__1::basic_string>> std::__1::allocator >::__init(char*, char*) in src.o
>>> 
>>>   std::__1::enable_if<__is_forward_iterator::value, 
>>> void>::type std::__1::basic_string>> std::__1::allocator >::__init(char const*, char const*) 
>>> in src.o
>>> 
>>>   
>>> std::__1::enable_if<__is_forward_iterator 
>>> >::value, void>::type std::__1::basic_string>> std::__1::char_traits, std::__1::allocator 
>>> >::__init >(std::__1::__wrap_iter, 
>>> std::__1::__wrap_iter) in src.o
>>> 
>>>   
>>> "std::__1::__match_any_but_newline::__exec(std::__1::__state&) 
>>> const", referenced from:
>>> 
>>>   vtable for std::__1::__match_any_but_newline in src.o
>>> 
>>>   "std::__1::locale::name() const", referenced from:
>>> 
>>>   std::__1::basic_regex>> >::__start_matching_list(bool) in src.o
>>> 
>>>   "std::__1::locale::use_facet(std::__1::locale::id&) const", referenced 
>>> from:

Re: [CMake] [cmake-developers] C++11/C++14 doesn't work in check_cxx_source_compiles

2016-11-24 Thread Craig Scott
You might also need to set CMAKE_CXX_EXTENSIONS
 to
OFF (it's ON by default). This controls which c++ library is linked for
some compilers, with clang and gcc being two cases where it does this. You
may also find this article
 about the related
CMake variables and commands to be of interest.

On Fri, Nov 25, 2016 at 5:43 AM, Roman Wüger  wrote:

> It is working now, after I added -lc++ to CMAKE_REQUIRED_LIBRARIES before
> the check_cxx_source_compiles() call.
>
> Shouldn't this be done by CMAKE_CXX_STANDARD?
>
> Best Regards
> Roman
>
> Am 24.11.2016 um 19:08 schrieb Roman Wüger :
>
> Hello,
>
>
>
> If I use a small piece of code which uses , then it fails with
> check_cxx_source_compiles. If I copy the piece of code into a file and run
> the following on the command line, then it works:
>
>
>
> clang++ main.cpp -std=c++14 -stdlib=libc++
>
>
>
> Here is the piece of code:
>
>
>
> #include 
>
> #include 
>
>
>
> int main() {
>
> const std::string text = "Roses are #ff, other flowers have other
> colors.";
>
> const std::regex pattern("#([a-f0-9]{2})");
>
>
>
> std::smatch match;
>
> std::regex_search(text, match, pattern);
>
>
>
> return 0;
>
> }
>
>
>
> I use this code in CMake as a platform check as followed:
>
>
>
> # C++11 Regular Expression
>
> set(CMAKE_REQUIRED_FLAGS "${CMAKE_CXX_FLAGS}")
>
> check_cxx_source_compiles(
>
>   "#include 
>
>#include 
>
>
>
>int main() {
>
>const std::string text = \"Roses are #ff, other flowers have
> other colors.\";
>
>const std::regex pattern(\"#([a-f0-9]{2})\");
>
>
>
>std::smatch match;
>
>std::regex_search(text, match, pattern);
>
>
>
>return 0;
>
>}"
>
>   HAVE_CXX11_REGULAR_EXPRESSIONS
>
> )
>
> set(CMAKE_REQUIRED_FLAGS "")
>
>
>
> CMakeFiles/CMakeError.log shows:
>
>
>
> Undefined symbols for architecture x86_64:
>
>   "std::__1::basic_string std::__1::allocator >::compare(char const*) const", referenced from:
>
>   std::__1::basic_regex >::__start_matching_list(bool) in src.o
>
>   "std::__1::__vector_base_common::__throw_length_error() const",
> referenced from:
>
>   std::__1::vector std::__1::allocator >::assign(unsigned
> long, std::__1::sub_match const&) in src.o
>
>   std::__1::vector std::__1::allocator
> >::allocate(unsigned long) in src.o
>
>   void std::__1::vector std::__1::allocator
> >::__push_back_slow_path >(std::__1::__state&&) in src.o
>
>   std::__1::vector std::__1::allocator
> >::__append(unsigned long, std::__1::sub_match const&) in src.o
>
>   std::__1::vector std::__1::allocator
> >::__append(unsigned long) in src.o
>
>   std::__1::vector std::__1::allocator
> >::allocate(unsigned long) in src.o
>
>   void std::__1::vector >::__push_back_slow_path(char&&) in src.o
>
>   ...
>
>   "std::__1::__basic_string_common::__throw_length_error() const",
> referenced from:
>
>   std::__1::enable_if<__is_forward_iterator::value,
> void>::type std::__1::basic_string std::__1::allocator >::__init(char*, char*) in src.o
>
>   std::__1::enable_if<__is_forward_iterator::value,
> void>::type std::__1::basic_string std::__1::allocator >::__init(char const*, char const*)
> in src.o
>
>   std::__1::enable_if<__is_forward_iterator
> >::value, void>::type std::__1::basic_string std::__1::char_traits, std::__1::allocator
> >::__init >(std::__1::__wrap_iter,
> std::__1::__wrap_iter) in src.o
>
>   "std::__1::__match_any_but_newline::__exec(std::__1::__state&)
> const", referenced from:
>
>   vtable for std::__1::__match_any_but_newline in src.o
>
>   "std::__1::locale::name() const", referenced from:
>
>   std::__1::basic_regex >::__start_matching_list(bool) in src.o
>
>   "std::__1::locale::use_facet(std::__1::locale::id&) const", referenced
> from:
>
>   std::__1::regex_traits::__init() in src.o
>
>   "std::__1::regex_error::regex_error(std::__1::regex_constants::error_type)",
> referenced from:
>
>   char const* std::__1::basic_regex >::__parse(char const*, char const*) in src.o
>
>   char const* std::__1::basic_regex >::__parse_basic_reg_exp(char const*, char const*) in src.o
>
>   char const* std::__1::basic_regex 

Re: [CMake] [cmake-developers] C++11/C++14 doesn't work in check_cxx_source_compiles

2016-11-24 Thread Roman Wüger
It is working now, after I added -lc++ to CMAKE_REQUIRED_LIBRARIES before the 
check_cxx_source_compiles() call.

Shouldn't this be done by CMAKE_CXX_STANDARD?

Best Regards
Roman

> Am 24.11.2016 um 19:08 schrieb Roman Wüger :
> 
> Hello,
>  
> If I use a small piece of code which uses , then it fails with 
> check_cxx_source_compiles. If I copy the piece of code into a file and run 
> the following on the command line, then it works:
>  
> clang++ main.cpp -std=c++14 -stdlib=libc++
>  
> Here is the piece of code:
>  
> #include 
> #include 
>  
> int main() {
> const std::string text = "Roses are #ff, other flowers have other 
> colors.";
> const std::regex pattern("#([a-f0-9]{2})");
>  
> std::smatch match;
> std::regex_search(text, match, pattern);
>  
> return 0;
> }
>  
> I use this code in CMake as a platform check as followed:
>  
> # C++11 Regular Expression
> set(CMAKE_REQUIRED_FLAGS "${CMAKE_CXX_FLAGS}")
> check_cxx_source_compiles(
>   "#include 
>#include 
>  
>int main() {
>const std::string text = \"Roses are #ff, other flowers have other 
> colors.\";
>const std::regex pattern(\"#([a-f0-9]{2})\");
>  
>std::smatch match;
>std::regex_search(text, match, pattern);
>  
>return 0;
>}"
>   HAVE_CXX11_REGULAR_EXPRESSIONS
> )
> set(CMAKE_REQUIRED_FLAGS "")
>  
> CMakeFiles/CMakeError.log shows:
>  
> Undefined symbols for architecture x86_64:
>   "std::__1::basic_string std::__1::allocator >::compare(char const*) const", referenced from:
>   std::__1::basic_regex >::__start_matching_list(bool) in src.o
>   "std::__1::__vector_base_common::__throw_length_error() const", 
> referenced from:
>   std::__1::vector std::__1::allocator >::assign(unsigned 
> long, std::__1::sub_match const&) in src.o
>   std::__1::vector std::__1::allocator >::allocate(unsigned 
> long) in src.o
>   void std::__1::vector std::__1::allocator 
> >::__push_back_slow_path(std::__1::__state&&) 
> in src.o
>   std::__1::vector std::__1::allocator >::__append(unsigned 
> long, std::__1::sub_match const&) in src.o
>   std::__1::vector std::__1::allocator 
> >::__append(unsigned long) in src.o
>   std::__1::vector std::__1::allocator 
> >::allocate(unsigned long) in src.o
>   void std::__1::vector >::__push_back_slow_path(char&&) in src.o
>   ...
>   "std::__1::__basic_string_common::__throw_length_error() const", 
> referenced from:
>   std::__1::enable_if<__is_forward_iterator::value, void>::type 
> std::__1::basic_string std::__1::allocator >::__init(char*, char*) in src.o
>   std::__1::enable_if<__is_forward_iterator::value, 
> void>::type std::__1::basic_string std::__1::allocator >::__init(char const*, char const*) in 
> src.o
>   std::__1::enable_if<__is_forward_iterator 
> >::value, void>::type std::__1::basic_string std::__1::char_traits, std::__1::allocator 
> >::__init >(std::__1::__wrap_iter, 
> std::__1::__wrap_iter) in src.o
>   "std::__1::__match_any_but_newline::__exec(std::__1::__state&) 
> const", referenced from:
>   vtable for std::__1::__match_any_but_newline in src.o
>   "std::__1::locale::name() const", referenced from:
>   std::__1::basic_regex >::__start_matching_list(bool) in src.o
>   "std::__1::locale::use_facet(std::__1::locale::id&) const", referenced from:
>   std::__1::regex_traits::__init() in src.o
>   
> "std::__1::regex_error::regex_error(std::__1::regex_constants::error_type)", 
> referenced from:
>   char const* std::__1::basic_regex >::__parse(char const*, char const*) in src.o
>   char const* std::__1::basic_regex >::__parse_basic_reg_exp(char const*, char const*) in src.o
>   char const* std::__1::basic_regex >::__parse_extended_reg_exp(char const*, char const*) in src.o
>   char const* std::__1::basic_regex >::__parse_assertion(char const*, char const*) in src.o
>   char const* std::__1::basic_regex >::__parse_atom(char const*, char const*) in src.o
>   char const* std::__1::basic_regex >::__parse_ERE_dupl_symbol(char const*, char const*, 
> std::__1::__owns_one_state*, unsigned int, unsigned int) in src.o
>   bool std::__1::basic_regex