From 983466fc38e4c26618e1cfdcaec144b89f185741 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sat, 16 Nov 2024 19:30:04 +0100 Subject: [PATCH 1/9] Flexible Layout, resizable bottom pane. --- libs/widgets/tabbable.cc | 38 +++++++++++++++++++++++++++------ libs/widgets/widgets/tabbable.h | 21 ++++++++++-------- 2 files changed, 43 insertions(+), 16 deletions(-) diff --git a/libs/widgets/tabbable.cc b/libs/widgets/tabbable.cc index c5ef10c6a7..0ef03403c9 100644 --- a/libs/widgets/tabbable.cc +++ b/libs/widgets/tabbable.cc @@ -80,7 +80,7 @@ Tabbable::default_layout () left_attachment_button.set_sensitive (0 != (_panelayout & (PaneLeft | AttLeft))); right_attachment_button.set_sensitive (0 != (_panelayout & PaneRight)); - bottom_attachment_button.set_sensitive (0 != (_panelayout & AttBottom)); + bottom_attachment_button.set_sensitive (0 != (_panelayout & (PaneBottom | AttBottom))); content_attachment_hbox.set_border_width(3); content_attachment_hbox.set_spacing(3); @@ -101,18 +101,25 @@ Tabbable::default_layout () _content_vbox.pack_start (*toolbar_frame, false, false); + Widget* midlevel = 0 == (_panelayout & PaneBottom) ? (Widget*)&content_midlevel_vbox : (Widget*)&content_midlevel_vpane; + if (_panelayout & PaneLeft) { _content_vbox.pack_start (content_left_pane, true, true); content_left_pane.add (content_att_left); - content_left_pane.add (content_midlevel_vbox); + content_left_pane.add (*midlevel); } else { _content_vbox.pack_start (content_hbox, true, true); content_hbox.pack_start (content_att_left, false, false); - content_hbox.pack_start (content_midlevel_vbox, true, true); + content_hbox.pack_start (*midlevel, true, true); } - content_midlevel_vbox.pack_start (content_right_pane, true, true); - content_midlevel_vbox.pack_start (content_att_bottom, false, false); + if (_panelayout & PaneBottom) { + content_midlevel_vpane.add (content_right_pane); + content_midlevel_vpane.add (content_att_bottom); + } else { + content_midlevel_vbox.pack_start (content_right_pane, true, true); + content_midlevel_vbox.pack_start (content_att_bottom, false, false); + } content_right_pane.add (content_inner_vbox); @@ -136,6 +143,12 @@ Tabbable::default_layout () content_left_pane.set_check_divider_position (true); content_left_pane.set_divider (0, 0.15); + if (_panelayout & PaneBottom) { + content_midlevel_vpane.set_child_minsize (content_right_pane, 300); + } + content_midlevel_vpane.set_check_divider_position (true); + content_midlevel_vpane.set_divider (0, 0.85); + _content_vbox.show_all(); } @@ -428,8 +441,15 @@ Tabbable::get_state() const node.set_property (X_("tabbed"), tabbed()); - node.set_property (string_compose("%1%2", _menu_name, X_("-rightpane-pos")).c_str(), content_right_pane.get_divider ()); - node.set_property (string_compose("%1%2", _menu_name, X_("-leftpane-pos")).c_str(), content_left_pane.get_divider ()); + if (_panelayout & PaneRight) { + node.set_property (string_compose("%1%2", _menu_name, X_("-rightpane-pos")).c_str(), content_right_pane.get_divider ()); + } + if (_panelayout & PaneLeft) { + node.set_property (string_compose("%1%2", _menu_name, X_("-leftpane-pos")).c_str(), content_left_pane.get_divider ()); + } + if (_panelayout & PaneBottom) { + node.set_property (string_compose("%1%2", _menu_name, X_("-bottompane-pos")).c_str(), content_midlevel_vpane.get_divider ()); + } return node; } @@ -461,6 +481,10 @@ Tabbable::set_state (const XMLNode& node, int version) fract = std::max (.05f, std::min (.95f, fract)); content_left_pane.set_divider (0, fract); } + if ( window_node->get_property (string_compose("%1%2", _menu_name, X_("-bottompane-pos")).c_str(), fract) ) { + fract = std::max (.05f, std::min (.95f, fract)); + content_midlevel_vpane.set_divider (0, fract); + } } diff --git a/libs/widgets/widgets/tabbable.h b/libs/widgets/widgets/tabbable.h index 1f807b22ca..36ae804a37 100644 --- a/libs/widgets/widgets/tabbable.h +++ b/libs/widgets/widgets/tabbable.h @@ -49,13 +49,14 @@ class LIBWIDGETS_API Tabbable : public Gtkmm2ext::WindowProxy { public: enum PaneLayout { - NoPanes = 0x0, ///< disable all attachment buttons, do not pack any panes or attachments - PaneLeft = 0x1, ///< left side attachment is a resizable pane - PaneRight = 0x2, ///< pack a resizable Pane on the right-side - AttBottom = 0x4, ///< bottom is a fixed size EBox attachment - PaneLeftBtm = 0x5, - PaneRightBtm = 0x6, - AttLeft = 0x8, ///< if PaneLeft is not set, pack a fixed size Ebox on the left (Editor-Mixer) + NoPanes = 0x00, ///< disable all attachment buttons, do not pack any panes or attachments + PaneLeft = 0x01, ///< left side attachment is a resizable pane + PaneRight = 0x02, ///< pack a resizable Pane on the right-side + PaneBottom = 0x04, ///< bottom Ebox is a resizable Pane + AttLeft = 0x08, ///< if PaneLeft is not set, pack a fixed size Ebox on the left (Editor-Mixer) + AttBottom = 0x10, ///< bottom is a fixed size EBox attachment + PaneLeftBtm = 0x11, + PaneRightBtm = 0x12, }; Tabbable (const std::string& user_visible_name, std::string const & untranslated_name, Gtk::Widget* top = NULL, bool tabbed_by_default = true, PaneLayout pl = PaneRightBtm); @@ -130,7 +131,7 @@ protected: * | | * | +--content_hbox--OR--content_left_pane--------------------------------------------------------+ | * | | | | - * | | +--att_left--+ +--content_midlevel_vbox-------------------------------------------------+ | | + * | | +--att_left--+ +--content_midlevel_vbox--OR-content_midlevel_vpane----------------------+ | | * | | $ (EBOX) | | +--content_right_pane------------------------------------------------+ | | | * | | | | | | +--content_inner_vbox-----------------+ +--content_right_vbox--+ | | | | * | | | O | | | | | | | | | | | @@ -147,7 +148,8 @@ protected: * | | | | N | | | +---------------------------------+ | | +------------------+ | | | | | * | | | (STRIP) | E | | +-------------------------------------+ +----------------------+ | | | | * | | | |<->| +--------------------------------------------------------------------+ | | | - * | | | | | | | | + * | | | | | 🡅 OPTIONAL 🡅 | | | + * | | | | | 🡇 PANE 🡇 | | | * | | | | | +-content_att_bottom-------------------------------------------------+ | | | * | | | | | $ (EBOX) | | | | * | | | | | | OPTIONAL BOTTOM (PROPERTIES) | | | | @@ -171,6 +173,7 @@ protected: HPane content_left_pane; Gtk::HBox content_hbox; EventBoxExt content_att_left; /* a placeholder for the mixer strip, if you want one */ + VPane content_midlevel_vpane; Gtk::VBox content_midlevel_vbox; HPane content_right_pane; Gtk::VBox content_inner_vbox; From 1c5117444f282efc3ad303da352ee5fb424d36f0 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sat, 16 Nov 2024 19:31:28 +0100 Subject: [PATCH 2/9] Replace custom TriggerUI pane with Tabbable pane --- gtk2_ardour/trigger_page.cc | 27 ++++++++++----------------- gtk2_ardour/trigger_page.h | 1 - 2 files changed, 10 insertions(+), 18 deletions(-) diff --git a/gtk2_ardour/trigger_page.cc b/gtk2_ardour/trigger_page.cc index c805971781..63e3a4ae21 100644 --- a/gtk2_ardour/trigger_page.cc +++ b/gtk2_ardour/trigger_page.cc @@ -66,7 +66,7 @@ using namespace Gtk; using namespace std; TriggerPage::TriggerPage () - : Tabbable (_("Cues"), X_("trigger")) + : Tabbable (_("Cues"), X_("trigger"), NULL, true, Tabbable::PaneLayout (Tabbable::PaneRight | Tabbable::PaneBottom)) , _cue_area_frame (0.5, 0, 1.0, 0) , _cue_box (16, 16 * TriggerBox::default_triggers_per_box) , _master_widget (16, 16) @@ -151,19 +151,12 @@ TriggerPage::TriggerPage () table->show_all (); _parameter_box.pack_start (*table); - _parameter_box.set_no_show_all (); + _parameter_box.show (); /* Top-level Layout */ content_app_bar.add (_application_bar); - content_innermost_hbox.add (_pane); - - _pane.add (_strip_group_box); - /* we cannot `content_midlevel_vbox.remove(_content_att_bottom)` and add it to the _pane - * because visibility updates are not propagated upward, and the pane will not collapse - * when the _parameter_box is hidden - */ - _pane.add (_parameter_box); - + content_innermost_hbox.add (_strip_group_box); + content_att_bottom.add (_parameter_box); content_att_right.add (_sidebar_notebook); /* Show all */ @@ -224,9 +217,9 @@ TriggerPage::showhide_att_bottom (bool yn) _show_bottom_pane = yn; if (!_show_bottom_pane) { - _parameter_box.hide (); + Tabbable::showhide_att_bottom (false); } else if (!Editor::instance ().get_selection ().triggers.empty ()) { - _parameter_box.show (); + Tabbable::showhide_att_bottom (true); } } @@ -445,7 +438,7 @@ TriggerPage::rec_enable_changed (Trigger const * trigger) _midi_trig_box.hide (); _midi_editor->viewport().hide (); - _parameter_box.hide (); + Tabbable::showhide_att_bottom (false); TriggerBox& box = trigger->box(); TriggerReference ref (trigger->boxptr(), trigger->index()); @@ -469,7 +462,7 @@ TriggerPage::rec_enable_changed (Trigger const * trigger) } if (_show_bottom_pane) { - _parameter_box.show (); + Tabbable::showhide_att_bottom (true); } } @@ -485,7 +478,7 @@ TriggerPage::selection_changed () _midi_trig_box.hide (); _midi_editor->viewport().hide (); - _parameter_box.hide (); + Tabbable::showhide_att_bottom (false); if (!selection.triggers.empty ()) { TriggerSelection ts = selection.triggers; @@ -511,7 +504,7 @@ TriggerPage::selection_changed () } if (_show_bottom_pane) { - _parameter_box.show (); + Tabbable::showhide_att_bottom (true); } } } diff --git a/gtk2_ardour/trigger_page.h b/gtk2_ardour/trigger_page.h index 6f08a06fbe..3f5ad2cc72 100644 --- a/gtk2_ardour/trigger_page.h +++ b/gtk2_ardour/trigger_page.h @@ -113,7 +113,6 @@ private: Gtkmm2ext::Bindings* bindings; - ArdourWidgets::VPane _pane; Gtk::HBox _strip_group_box; Gtk::ScrolledWindow _strip_scroller; Gtk::HBox _strip_packer; From 27ccb1c9d343ec3def271f929e695a682a8b8dc6 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sat, 16 Nov 2024 19:38:59 +0100 Subject: [PATCH 3/9] Be explicit about resizable Pane vs fixed size Attachment --- gtk2_ardour/mixer_ui.cc | 2 +- gtk2_ardour/public_editor.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gtk2_ardour/mixer_ui.cc b/gtk2_ardour/mixer_ui.cc index ac12d5a21f..41cb6c76b2 100644 --- a/gtk2_ardour/mixer_ui.cc +++ b/gtk2_ardour/mixer_ui.cc @@ -133,7 +133,7 @@ Mixer_UI::instance () } Mixer_UI::Mixer_UI () - : Tabbable (_("Mixer"), X_("mixer"), NULL, true, Profile->get_mixbus () ? Tabbable::PaneRightBtm : Tabbable::PaneLeft) + : Tabbable (_("Mixer"), X_("mixer"), NULL, true, Profile->get_mixbus () ? Tabbable::PaneLayout (Tabbable::AttBottom | Tabbable::PaneRight) : Tabbable::PaneLeft) , plugin_search_clear_button (X_("Clear")) , _mixer_scene_release (0) , no_track_list_redisplay (false) diff --git a/gtk2_ardour/public_editor.cc b/gtk2_ardour/public_editor.cc index 83f4b47e51..7c500bb716 100644 --- a/gtk2_ardour/public_editor.cc +++ b/gtk2_ardour/public_editor.cc @@ -33,7 +33,7 @@ ARDOUR::DataType PublicEditor::pbdid_dragged_dt = ARDOUR::DataType::NIL; PublicEditor::PublicEditor () : EditingContext (X_("Editor")) - , Tabbable (_("Editor"), X_("editor"), NULL, true, Tabbable::PaneLayout (Tabbable::AttLeft | Tabbable::PaneRightBtm)) + , Tabbable (_("Editor"), X_("editor"), NULL, true, Tabbable::PaneLayout (Tabbable::AttLeft | Tabbable::AttBottom | Tabbable::PaneRight)) { _suspend_route_redisplay_counter.store (0); } From 3625c28d54a9f2c24fd058e76bfca7f214d747ce Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sat, 16 Nov 2024 19:39:20 +0100 Subject: [PATCH 4/9] Remove ambiguous enum bit combinations --- libs/widgets/widgets/tabbable.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libs/widgets/widgets/tabbable.h b/libs/widgets/widgets/tabbable.h index 36ae804a37..f579724585 100644 --- a/libs/widgets/widgets/tabbable.h +++ b/libs/widgets/widgets/tabbable.h @@ -55,11 +55,9 @@ public: PaneBottom = 0x04, ///< bottom Ebox is a resizable Pane AttLeft = 0x08, ///< if PaneLeft is not set, pack a fixed size Ebox on the left (Editor-Mixer) AttBottom = 0x10, ///< bottom is a fixed size EBox attachment - PaneLeftBtm = 0x11, - PaneRightBtm = 0x12, }; - Tabbable (const std::string& user_visible_name, std::string const & untranslated_name, Gtk::Widget* top = NULL, bool tabbed_by_default = true, PaneLayout pl = PaneRightBtm); + Tabbable (const std::string& user_visible_name, std::string const & untranslated_name, Gtk::Widget* top = NULL, bool tabbed_by_default = true, PaneLayout pl = PaneRight); ~Tabbable (); void add_to_notebook (Gtk::Notebook& notebook); From 5aaec05429250bfe40902210ead245fb21eba6ca Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sat, 16 Nov 2024 22:17:29 +0100 Subject: [PATCH 5/9] Add Latch Automation for MCP see https://discourse.ardour.org/t/cannot-activate-latch-automation-state-via-x-touch-in-mackie-mode/110969 --- libs/surfaces/mackie/mcp_buttons.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/surfaces/mackie/mcp_buttons.cc b/libs/surfaces/mackie/mcp_buttons.cc index 5732ee2fbc..abf1dcf790 100644 --- a/libs/surfaces/mackie/mcp_buttons.cc +++ b/libs/surfaces/mackie/mcp_buttons.cc @@ -1144,6 +1144,7 @@ MackieControlProtocol::latch_press (MACKIE_NAMESPACE::Button&) MACKIE_NAMESPACE::LedState MackieControlProtocol::latch_release (MACKIE_NAMESPACE::Button&) { + set_automation_state (ARDOUR::Latch); return none; } MACKIE_NAMESPACE::LedState From 32ff87f7f6da97830ab002cc64565bafd0b65dc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Dom=C3=ADnguez?= Date: Tue, 27 Aug 2024 00:12:24 +0200 Subject: [PATCH 6/9] Replace boost::aligned_storage with alignas std::array --- libs/ardour/ardour/chan_mapping.h | 22 +++++++++++++++++----- libs/pbd/pbd/stack_allocator.h | 19 ++++++++----------- 2 files changed, 25 insertions(+), 16 deletions(-) diff --git a/libs/ardour/ardour/chan_mapping.h b/libs/ardour/ardour/chan_mapping.h index 7a17e48499..8bd9a99812 100644 --- a/libs/ardour/ardour/chan_mapping.h +++ b/libs/ardour/ardour/chan_mapping.h @@ -106,12 +106,24 @@ public: #if defined(_MSC_VER) /* && (_MSC_VER < 1900) * Regarding the note (below) it was initially * thought that this got fixed in VS2015 - but - * in fact it's still faulty (JE - Feb 2021) */ + * in fact it's still faulty (JE - Feb 2021). + * 2024-09-03 update: Faulty compile up to + * VS2022 17.4. From there it compiles but does + * not link with the exception of the arm64 + * platform. This quirk is actually a bug that + * Microsoft seems to have failed to + * acknowledge as such for years judging from + * web search results about MSVC's std::map, + * and have not even fixed correctly when they + * tried. + */ /* Use the older (heap based) mapping for early versions of MSVC. - * In fact it might be safer to use this for all MSVC builds - as - * our StackAllocator class depends on 'boost::aligned_storage' - * which is known to be troublesome with Visual C++ :- - * https://www.boost.org/doc/libs/1_65_0/libs/type_traits/doc/html/boost_typetraits/reference/aligned_storage.html + * In fact it might be safer to use this for all MSVC builds. It + * was thought that this was related to issues with + * boost::aligned_storage, but actually it seems to be that there + * are bugs in the std::map implementation of MSVC that are being + * triggered, messing with the copy constructor of + * PBD::StackAllocator. */ typedef std::map TypeMapping; typedef std::map Mappings; diff --git a/libs/pbd/pbd/stack_allocator.h b/libs/pbd/pbd/stack_allocator.h index 9eed081ec0..742cf39b6d 100644 --- a/libs/pbd/pbd/stack_allocator.h +++ b/libs/pbd/pbd/stack_allocator.h @@ -19,7 +19,6 @@ #ifndef PBD_STACK_ALLOCATOR_H #define PBD_STACK_ALLOCATOR_H -#include #include #include "pbd/libpbd_visibility.h" @@ -61,22 +60,22 @@ public: }; StackAllocator () - : _ptr ((pointer)&_buf) + : _ptr (_buf.data()) { } StackAllocator (const StackAllocator&) - : _ptr ((pointer)&_buf) + : StackAllocator () { } template StackAllocator (const StackAllocator&) - : _ptr ((pointer)&_buf) + : StackAllocator () { } /* inspired by http://howardhinnant.github.io/stack_alloc.h */ pointer allocate (size_type n, void* hint = 0) { - if ((pointer)&_buf + stack_capacity >= _ptr + n) { + if (_buf.data() + stack_capacity >= _ptr + n) { DEBUG_STACK_ALLOC ("Allocate %ld item(s) of size %zu on the stack\n", n, sizeof (T)); pointer rv = _ptr; _ptr += n; @@ -108,12 +107,12 @@ public: bool operator== (StackAllocator const& a) const { - return &_buf == &a._buf; + return _buf.data() == a._buf.data(); } bool operator!= (StackAllocator const& a) const { - return &_buf != &a._buf; + return _buf.data() != a._buf.data(); } template @@ -147,12 +146,10 @@ private: bool pointer_in_buffer (pointer const p) { - return ((pointer const)&_buf <= p && p < (pointer const)&_buf + stack_capacity); + return (_buf.data() <= p && p < _buf.data() + stack_capacity); } - typedef typename boost::aligned_storage::type align_t; - - align_t _buf; + alignas(16) std::array _buf; pointer _ptr; }; From 09eeca09a96beab03427b0bfd8ff663abe11e378 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sun, 17 Nov 2024 20:08:14 +0100 Subject: [PATCH 7/9] Remove unused includes --- libs/surfaces/osc/osc_cue_observer.cc | 2 -- libs/surfaces/osc/osc_global_observer.cc | 2 -- libs/surfaces/osc/osc_route_observer.cc | 2 -- libs/surfaces/osc/osc_select_observer.cc | 2 -- 4 files changed, 8 deletions(-) diff --git a/libs/surfaces/osc/osc_cue_observer.cc b/libs/surfaces/osc/osc_cue_observer.cc index 0774f3c70f..1d062571ae 100644 --- a/libs/surfaces/osc/osc_cue_observer.cc +++ b/libs/surfaces/osc/osc_cue_observer.cc @@ -17,8 +17,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include "boost/lambda/lambda.hpp" - #include "pbd/control_math.h" #include "ardour/track.h" diff --git a/libs/surfaces/osc/osc_global_observer.cc b/libs/surfaces/osc/osc_global_observer.cc index 7b6f82481d..dd3e3dc79a 100644 --- a/libs/surfaces/osc/osc_global_observer.cc +++ b/libs/surfaces/osc/osc_global_observer.cc @@ -17,8 +17,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include "boost/lambda/lambda.hpp" - #include "pbd/control_math.h" #include "ardour/amp.h" diff --git a/libs/surfaces/osc/osc_route_observer.cc b/libs/surfaces/osc/osc_route_observer.cc index 39b595790f..27944b8332 100644 --- a/libs/surfaces/osc/osc_route_observer.cc +++ b/libs/surfaces/osc/osc_route_observer.cc @@ -19,8 +19,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include "boost/lambda/lambda.hpp" - #include "pbd/control_math.h" #include diff --git a/libs/surfaces/osc/osc_select_observer.cc b/libs/surfaces/osc/osc_select_observer.cc index b7eec337ae..a038540265 100644 --- a/libs/surfaces/osc/osc_select_observer.cc +++ b/libs/surfaces/osc/osc_select_observer.cc @@ -19,8 +19,6 @@ */ #include -#include "boost/lambda/lambda.hpp" - #include "pbd/control_math.h" #include "ardour/session.h" From 27c6276ff88584f5abe68d504f3d201081e7a3a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Dom=C3=ADnguez?= Date: Sun, 17 Nov 2024 20:19:33 +0100 Subject: [PATCH 8/9] Replace boost::bind with std::bind --- tools/signal-test/signal-test.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/signal-test/signal-test.cc b/tools/signal-test/signal-test.cc index 77a3acafd2..e8dc03d1d2 100644 --- a/tools/signal-test/signal-test.cc +++ b/tools/signal-test/signal-test.cc @@ -23,7 +23,7 @@ class Rx1 public: Rx1 (Tx& sender) { - sender.sig1.connect_same_thread (_connection, boost::bind (&Rx1::cb, this, _1)); + sender.sig1.connect_same_thread (_connection, std::bind (&Rx1::cb, this, _1)); } private: @@ -87,7 +87,7 @@ class Rx2 : public PBD::ScopedConnectionList public: Rx2 (Tx& sender) { - sender.sig1.connect (*this, &_ir, boost::bind (&Rx2::cb, this, _1), &event_loop); + sender.sig1.connect (*this, &_ir, std::bind (&Rx2::cb, this, _1), &event_loop); } private: From fa57d5ed86d0df325e99c339fa4d402d3023d9a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Dom=C3=ADnguez?= Date: Sun, 17 Nov 2024 20:20:21 +0100 Subject: [PATCH 9/9] Disambiguate std and boost placeholder --- libs/evoral/ControlSet.cc | 1 + libs/pbd/receiver.cc | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/evoral/ControlSet.cc b/libs/evoral/ControlSet.cc index 19f87a40fc..ca486cd00e 100644 --- a/libs/evoral/ControlSet.cc +++ b/libs/evoral/ControlSet.cc @@ -26,6 +26,7 @@ #include "evoral/Event.h" using namespace std; +using namespace std::placeholders; namespace Evoral { diff --git a/libs/pbd/receiver.cc b/libs/pbd/receiver.cc index 26d3a75295..180aa9bcf9 100644 --- a/libs/pbd/receiver.cc +++ b/libs/pbd/receiver.cc @@ -42,9 +42,8 @@ void Receiver::listen_to (Transmitter &transmitter) { - /* odd syntax here because boost's placeholders (_1, _2) are in an - anonymous namespace which causes ambiguity with sigc++ (and will also - do so with std::placeholder in the C++11 future + /* odd syntax here because std's placeholders (_1, _2) are in an + anonymous namespace which causes ambiguity with sigc++ */ transmitter.sender().connect_same_thread (connections, std::bind (&Receiver::receive, this, std::placeholders::_1, std::placeholders::_2));