From f16ce5cc425f3bea607be21579892e13b7f9018b Mon Sep 17 00:00:00 2001 From: jason_w Date: Wed, 10 Jul 2024 20:38:01 +0800 Subject: [PATCH] fix: fix reference to 'option' is ambiguous When compiling examples with g++7.5 on Ubuntu18.04, an error occurs: examples/cpp/dds/HelloWorldExampleTCP/HelloWorld_main.cpp:36:21: error: reference to 'option' is ambiguous Signed-off-by: jason_w --- examples/cpp/dds/HelloWorldExampleTCP/HelloWorld_main.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/examples/cpp/dds/HelloWorldExampleTCP/HelloWorld_main.cpp b/examples/cpp/dds/HelloWorldExampleTCP/HelloWorld_main.cpp index 94a00bf20c2..76c809cdd7a 100644 --- a/examples/cpp/dds/HelloWorldExampleTCP/HelloWorld_main.cpp +++ b/examples/cpp/dds/HelloWorldExampleTCP/HelloWorld_main.cpp @@ -29,6 +29,8 @@ namespace option = eprosima::option; +using eprosima::fastrtps::Domain; + struct Arg : public option::Arg { static void print_error( @@ -105,8 +107,6 @@ struct Arg : public option::Arg }; - - enum optionIndex { UNKNOWN_OPT, @@ -169,9 +169,6 @@ const option::Descriptor usage[] = { { 0, 0, 0, 0, 0, 0 } }; -using namespace eprosima; -using namespace fastrtps; -using namespace rtps; int main( int argc, char** argv)